【问题标题】:npm ERR! code ELIFECYCLE npm run servernpm 错误!代码 ELIFECYCLE npm 运行服务器
【发布时间】:2017-11-15 16:25:09
【问题描述】:

我正在学习 react 和 redux 课程,我想运行服务器。

但是当我执行 npm run server 时,它会抛出这个:

El sistema no puede encontrar la ruta especificada.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! flashcard-app@1.0.0 server: `cd public; live-server --port=1234 --
entry-file=index.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the flashcard-app@1.0.0 server 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\Robbie\AppData\Roaming\npm-cache\_logs\2017-06-
13T18_35_14_604Z-debug.log

我该怎么办?谢谢。

【问题讨论】:

  • 开始阅读这个how to ask a good question。特别注意 MCVE 部分。
  • 在运行npm run server之前,您是否在终端中运行了npm install

标签: reactjs npm redux


【解决方案1】:

一种可能是您使用的是旧版本的 node js 或 npm。检查节点 first 并在必要时对其进行更新。然后,确保你的 npm 是现代的; node js 将自动包含旧版本的 npm 并删除您当前的版本。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-04-14
    • 1970-01-01
    • 2020-09-18
    • 2020-04-06
    • 2019-02-26
    • 2021-01-18
    相关资源
    最近更新 更多