【发布时间】:2021-01-11 08:01:50
【问题描述】:
我正在尝试运行 Github probyto 中定义的 Node js 程序
我正在按照上面 github 链接中定义的所有步骤进行操作,但是当我尝试运行时
npm run client
它给了我一个错误
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@2.0.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@2.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gautam\AppData\Roaming\npm-cache\_logs\2021-01-11T07_55_54_943Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mern-jwt-auth@2.0.0 client: `npm start --prefix client`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mern-jwt-auth@2.0.0 client script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gautam\AppData\Roaming\npm-cache\_logs\2021-01-11T07_55_54_976Z-debug.log
我已经尝试了一些解决方案,例如
更新节点/npm
删除节点模块和 packagelock.json 文件,然后 npm install
npm 更新
但似乎没有任何效果。谁能帮我运行这个。任何帮助表示赞赏
【问题讨论】:
-
从 package.json 所在的文件夹运行 npm。
-
我按照你说的从文件夹中运行了“npm”,它似乎工作正常。那如何解决我的错误?
-
什么意思?您只需从根包文件夹(package.json 所在的位置)运行 npm。
-
这和 Python 有什么关系?请不要标记垃圾邮件。
-
您是否在根文件夹中运行了这两个步骤 1. npm run client-install 2.copy config/keys.sample.js config/keys.js 然后根据要求更新 keys.js 文件变量.