close

[Solved] npm WARN Local package.json exists but node_modules missing

Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to start a Redux application with the npm start command but I am facing this error npm WARN Local package.json exists, but node_modules missing, did you mean to install in reactjs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How npm WARN Local package.json exists but node_modules missing Error Occurs ?

I am just trying to start a Redux application with the npm start command but I am facing this error.

> 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?

How To Solve npm WARN Local package.json exists but node_modules missing Error ?

  1. How To Solve npm WARN Local package.json exists but node_modules missing Error?

    To Solve npm WARN Local package.json exists but node_modules missing Error 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. run npm install first then run npm start

  2. npm WARN Local package.json exists but node_modules missing

    To Solve npm WARN Local package.json exists but node_modules missing Error 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. run npm install first then run npm start

Solution 1

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

  1. run npm install first
  2. then run npm start

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Leave a Comment