Nuxt.js启动脚本失败

时间:2018-06-12 12:32:11

标签: javascript node.js npm nuxt.js

我有一个我使用Nuxt.js建立的网站,我一直很喜欢它的一切,但我似乎无法弄清楚为什么我会收到以下内容我尝试$ npm run dev

时出错
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm@6.1.0
3 info using node@v8.11.2
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle carlinfitness@1.0.0~predev: carlinfitness@1.0.0
6 info lifecycle carlinfitness@1.0.0~dev: carlinfitness@1.0.0
7 verbose lifecycle carlinfitness@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle carlinfitness@1.0.0~dev: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/zac/code/carlinFitness/node_modules/.bin:/home/zac/bin:/home/zac/.local/bin:/home/zac/bin:/home/zac/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle carlinfitness@1.0.0~dev: CWD: /home/zac/code/carlinFitness
10 silly lifecycle carlinfitness@1.0.0~dev: Args: [ '-c', 'nuxt' ]
11 silly lifecycle carlinfitness@1.0.0~dev: Returned: code: 1  signal: null
12 info lifecycle carlinfitness@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: carlinfitness@1.0.0 dev: `nuxt`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid carlinfitness@1.0.0
15 verbose cwd /home/zac/code/carlinFitness
16 verbose Linux 4.13.0-43-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
18 verbose node v8.11.2
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error carlinfitness@1.0.0 dev: `nuxt`
22 error Exit status 1
23 error Failed at the carlinfitness@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

1 个答案:

答案 0 :(得分:0)

我同意Sk_。该错误消息是由端口3000上运行的进程引起的。在某些情况下,我在浏览器的地址栏中输入了http://localhost:3000,我的数据库监视器出现了!然后关闭显示器,然后重试。这次,$ npm run dev运行顺利。

迈克尔