node.js - npm run dev 命令给出错误日志并且它没有在浏览器中打开我的项目
问题描述
当我使用命令 npm run dev 在我的 ubuntu 系统中运行我的反应节点项目时,它给了我错误日志并且它没有在我的浏览器中打开,即使我尝试使用 localhost:3000 打开它也不起作用,在这里是我的错误日志,任何人都可以查看它并给我正确的解决方案吗?
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'client' ]
2 info using npm@3.5.2
3 info using node@v8.10.0
4 verbose run-script [ 'preclient', 'client', 'postclient' ]
5 info lifecycle mern-auth@1.0.0~preclient: mern-auth@1.0.0
6 silly lifecycle mern-auth@1.0.0~preclient: no script for preclient, continuing
7 info lifecycle mern-auth@1.0.0~client: mern-auth@1.0.0
8 verbose lifecycle mern-auth@1.0.0~client: unsafe-perm in lifecycle true
9 verbose lifecycle mern-auth@1.0.0~client: PATH: /usr/share/npm/bin/node-gyp-bin:/var/www/mern-plaid/node_modules/.bin:/usr/share/npm/bin/node-gyp-bin:/var/www/mern-plaid/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle mern-auth@1.0.0~client: CWD: /var/www/mern-plaid
11 silly lifecycle mern-auth@1.0.0~client: Args: [ '-c', 'npm start --prefix client' ]
12 silly lifecycle mern-auth@1.0.0~client: Returned: code: 1 signal: null
13 info lifecycle mern-auth@1.0.0~client: Failed to exec client script
14 verbose stack Error: mern-auth@1.0.0 client: `npm start --prefix client`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid mern-auth@1.0.0
16 verbose cwd /var/www/mern-plaid
17 error Linux 5.0.0-25-generic
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "client"
19 error node v8.10.0
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error mern-auth@1.0.0 client: `npm start --prefix client`
22 error Exit status 1
23 error Failed at the mern-auth@1.0.0 client script 'npm start --prefix client'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the mern-auth package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm start --prefix client
23 error You can get information on how to open an issue for this project with:
23 error npm bugs mern-auth
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls mern-auth
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
解决方案
推荐阅读
- javascript - 无法在浏览器中获取 angularJS 的输出
- css - 将段落宽度限制为标题宽度
- javascript - 我可以将我的 jQuery 代码拆分为 2 个 .js 文件吗?
- reactjs - 侧边菜单反应原生
- html - 如何在 Windows 上运行超轻量级?
- reactjs - 使用 React 时图像未加载
- angular - 注销功能无法正常工作。点击3到4次后才能正常工作。最初它只是重新加载页面但不注销
- reactjs - React Hook , setvariable 和 print 使用效果相同
- grep - 如何搜索在特定日期之间修改的 Linux 文件的内容
- r - R中包含向量的复数