【问题标题】:npm start issue working on react and next .jsnpm start 处理 react 和 next .js 的问题
【发布时间】:2021-12-01 01:46:06
【问题描述】:

我刚刚从 GitHub 存储库中克隆了代码。 我尝试使用以下命令运行它

 'next' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nextjs@0.1.0 start: `next start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nextjs@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DELL\AppData\Roaming\npm-cache\_logs\2021-10-12T12_27_53_876Z-debug.log
PS F:\REACT\projectnamme> node -v
v12.16.1
PS F:\REACT\projectnamme> npm -v
6.13.4
F:\REACT\projectnamme> create-react-app --version
3.4.1

【问题讨论】:

  • 你安装依赖了吗?
  • 您需要先运行npm install,或至少运行npm install next
  • 我的意思是,这是基础...,我确定 github repo 有一个自述文件,在发布之前尝试做一些研究

标签: reactjs next.js


【解决方案1】:

首先,你需要下载你的 node_modules

您可以使用npm install yarn install

然后在您的终端中执行npm startyarn start

【讨论】:

    猜你喜欢
    • 2020-06-05
    • 2020-03-26
    • 2022-06-10
    • 2020-10-30
    • 2020-05-25
    • 2017-09-19
    • 1970-01-01
    • 2019-05-30
    相关资源
    最近更新 更多