react-starter
react-starter copied to clipboard
Cannot find module 'tapable'
In follwing README.md on ubuntu 14.04 skipping only vagrant commands, I get npm installed but seem to be missing dependancies. This is the first missing dependency:
npm run dev-server
> [email protected] dev-server /home/jcalfee/react-starter
> webpack-dev-server --config webpack-dev-server.config.js --progress --colors --port 2992 --inline
module.js:336
throw err;
^
Error: Cannot find module 'tapable'
same problem here I'm using react 0.14.8 with webpack-dev-server 1.14.1
If you rm -rf node_modules
and run npm install
it will work.
But I don't understand why it happened.
I did rm -rf node_modules
and run npm install
, still not working for me :(
I would try running this to see what happens.
npm cache clear --force
rm -rf node_modules
npm install
I ran into this recently in a CI env. Clearing everything and installing from scratch (with the above steps) fixed it for me. Tested in NPM 5.1.0 Assuming you have webpack installed correctly with its dependencies, this should work fine.
@AlexSwensen thanks, that three step process cleared the error. Which is funny (funny euw?, not funny haha) 'cause this is a new project and all the pieces were just installed ...
@Walt-D-Cat Yeah, it has something to do with the npm cache getting in a strange state in 5.1.0. (NPM stores a separate cache in addition to node_moduels
)
I usually recommend just checking the latest version of npm
with npm install -g npm@latest
(you may need sudo
if your permissions aren't set up correctly)
NPM 5 has some great (but new) changes. It's going to take some time for the rest of the Node ecosystem to catch up. I'm sure when Node 8 goes LTS with NPM 5 included it will help a lot. That is still a few months out though.
Best of luck!
Helped me also, thanks!
I did this and now it says that the express module is missing. The app crashes on server.js command.