本地 package.json 存在,但缺少 node_modules [英] Local package.json exists, but node_modules missing

查看:34
本文介绍了本地 package.json 存在,但缺少 node_modules的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试启动我刚刚从 GitHub 存储库克隆的 Redux 应用程序.

I am trying to start a Redux application I just cloned from a GitHub repository.

我尝试使用以下命令运行它

I tried to run it with the following command

npm start

我收到此错误

> react-redux@1.0.0 start /home/workspace/assignment
> webpack-dev-server --config ./configs/webpack/webpack.config.development.js

sh: 1: webpack-dev-server: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! react-redux@1.0.0 start: `webpack-dev-server --config ./configs/webpack/webpack.config.development.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the react-redux@1.0.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!     /home/.npm/_logs/2018-05-15T16_32_44_571Z-debug.log

任何帮助将不胜感激

推荐答案

npm start 运行应用程序制造商为轻松启动应用程序而构建的脚本npm install 安装 package.json 中的所有包

npm start runs a script that the app maker built for easy starting of the app npm install installs all the packages in package.json

先运行npm install

然后运行 ​​npm start

这篇关于本地 package.json 存在,但缺少 node_modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆