Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redux-router 1.0.0beta5 introduces Error: Cannot find module 'invariant' #650

Open
bdefore opened this issue Dec 2, 2015 · 9 comments
Open

Comments

@bdefore
Copy link
Collaborator

bdefore commented Dec 2, 2015

From my heroku deploy logs on startup:

Dec 01 16:18:47 redux-universal-starter app/web.1:  [0] Error: Cannot find module 'invariant' 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Function.Module._resolveFilename (module.js:336:15) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Function.Module._load (module.js:286:25) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Module.require (module.js:365:17) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at require (module.js:384:17) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Object.<anonymous> (/app/node_modules/redux-router/node_modules/history/lib/createMemoryHistory.js:9:18) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Module._compile (module.js:434:26) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Module._extensions..js (module.js:452:10) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Object.require.extensions.(anonymous function) [as .js] (/app/node_modules/babel-core/lib/api/register/node.js:214:7) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Module.load (module.js:355:32) 
Dec 01 16:18:47 redux-universal-starter app/web.1:  [0]     at Function.Module._load (module.js:310:12) 

Reverting back to 1.0.0-beta4 fixed the issue.

@colinshen
Copy link

I updated node to 4.2.2 and npm to 3.5, reinstall everything to fix the problem.

@rafanami
Copy link

rafanami commented Dec 2, 2015

Having the same issue, node 4.2.2 and npm 2.14.7

@hitripod
Copy link
Contributor

hitripod commented Dec 2, 2015

Having the same issue, node v0.10.26 and npm v2.5.1

@przeor
Copy link

przeor commented Dec 4, 2015

Just FYI:
I had the same problem on my system OS X Yosemite and this worked:

Please make sure that you are using
node v4.2.2
and
npm 3.5.1
Use Node Version Controler (NVM) if you need more versions of node on your machine.

(Before I had node v4.0.0 and npm v2.X - and had the issue described on top comment)

@bdefore
Copy link
Collaborator Author

bdefore commented Dec 4, 2015

I can verify that using npm3 fixes the issue. Per our package.json (https://github.com/erikras/react-redux-universal-hot-example/blob/master/package.json#L175) I've been running the Node 4.1.1 (which comes with npm 2.14.4). Unfortunately, our Travis tests are still passing since they don't run the webpack dev server.

If we are now requiring npm3 we should make note of that in the README and add it to engines in package.json:

Since this issue only affects development, Heroku deploys continue to work, but it would be wise to tell it to explicitly use npm3: https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version

@kikoanis
Copy link

kikoanis commented Dec 7, 2015

It seems that rackt is considering replacing redux-router with redux-simple-router which is I think is the right way to go for its simplicity and ease of use

@nickeblewis
Copy link

Cool, same issue for me - upgraded node and npm as suggested, removed node_modules prior to running "npm install" once more.... works!

@andresgutgon
Copy link

I tried npm@3. It's super slow :/

@andrewmclagan
Copy link
Collaborator

ouch, this repo is hard to get going...

#699

#650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants