Tried fly.io tonight and it looks like it’s not detecting my nuxt app.
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@flydotio/dockerfile": "^0.4.10",
"@nuxt/devtools": "latest",
"vue": "^3.3.8",
"vue-router": "^4.2.5"
},
"dependencies": {
"@nuxtjs/i18n": "^8.0.0-rc.5",
"nuxt": "^3.8.1",
"@nuxtjs/google-fonts": "^3.0.2",
"@nuxtjs/tailwindcss": "^6.9.5",
"nuxt-icon": "^0.6.6"
}
}
$ fly launch
Scanning source code
Detected a NodeJS app
Creating app in /home/lilja/code/gantt-experiment/nuxt-app
We're about to launch your NodeJS app on Fly.io. Here's what you're getting:
Organization: Lilja (fly launch defaults to the personal org)
Name: nuxt-app-wispy-sunset-1916 (derived from your directory name)
Region: Amsterdam, Netherlands (this is the fastest region for you)
App Machines: shared-cpu-1x, 1GB RAM (most apps need about 1GB of RAM)
Postgres: <none> (not requested)
Redis: <none> (not requested)
Moreover, I tried to deploy it as is and then stumbled upon this issue, moved my nuxt dependencies into the dependencies
section and deployed it.
Then I started seeing these logs on the machines:
$ fly logs -a nuxt-app
Waiting for logs...
2023-11-16T21:47:43.899 app[90806994b229e8] arn [info] [ 0.043514] PCI: Fatal: No config space access function found
2023-11-16T21:47:44.134 app[90806994b229e8] arn [info] INFO Starting init (commit: 15238e9)...
2023-11-16T21:47:44.155 app[90806994b229e8] arn [info] INFO Preparing to run: `docker-entrypoint.sh node index.js` as root
2023-11-16T21:47:44.165 app[90806994b229e8] arn [info] INFO [fly api proxy] listening at /.fly/api
2023-11-16T21:47:44.173 app[90806994b229e8] arn [info] 2023/11/16 21:47:44 listening on [fdaa:3:9826:a7b:1e9:812b:6e03:2]:22 (DNS: [fdaa::3]:53)
2023-11-16T21:47:44.179 proxy[90806994b229e8] arn [info] machine started in 463.608139ms
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] node:internal/modules/cjs/loader:998
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] throw err;
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] ^
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] Error: Cannot find module '/app/index.js'
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] at Module._load (node:internal/modules/cjs/loader:841:27)
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] at node:internal/main/run_main_module:23:47 {
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] code: 'MODULE_NOT_FOUND',
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] requireStack: []
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] }
2023-11-16T21:47:44.343 app[90806994b229e8] arn [info] Node.js v18.12.1