react-starter icon indicating copy to clipboard operation
react-starter copied to clipboard

Cannot find module 'tapable'

Open jcalfee opened this issue 8 years ago • 8 comments

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'

jcalfee avatar Nov 02 '15 15:11 jcalfee

same problem here I'm using react 0.14.8 with webpack-dev-server 1.14.1

HosseinAgha avatar May 08 '16 10:05 HosseinAgha

If you rm -rf node_modules and run npm install it will work. But I don't understand why it happened.

shaimr avatar May 26 '16 12:05 shaimr

I did rm -rf node_modules and run npm install, still not working for me :(

imtmh avatar Mar 01 '17 12:03 imtmh

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 avatar Jul 10 '17 19:07 AlexSwensen

@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 ...

waltiam avatar Jul 18 '17 13:07 waltiam

@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!

AlexSwensen avatar Jul 18 '17 15:07 AlexSwensen

Helped me also, thanks!

thodges314 avatar Jul 18 '17 17:07 thodges314

I did this and now it says that the express module is missing. The app crashes on server.js command.

jefflueck avatar Sep 12 '17 14:09 jefflueck