Error: Cannot find module 'invariant'
See original GitHub issueI am getting this error when running npm run dev
after cloning the project:
[piping] can't execute file: /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/bin/server.js
[1] [piping] error given was: Error: Cannot find module 'invariant'
[1] at Function.Module._resolveFilename (module.js:336:15)
[1] at Function._module3.default._resolveFilename (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/webpack-isomorphic-tools/node_modules/require-hacker/babel-transpiled-modules/require hacker.js:403:34)
[1] at Function.module._load (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/piping/lib/launcher.js:24:23)
[1] at Module.require (module.js:365:17)
[1] at require (module.js:384:17)
[1] at Object.<anonymous> (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/redux-router/node_modules/history/lib/createMemoryHistory.js:9:18)
[1] at Module._compile (module.js:460:26)
[1] at Module._extensions..js (module.js:478:10)
[1] at require.extensions.(anonymous function) (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/babel-core/lib/api/register/node.js:214:7)
[1] at Object._module3.default._extensions.(anonymous function) [as .js] (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/webpack-isomorphic-tools/node_modules/require-hacker/babel-transpiled-modules/require hacker.js:250:71)
[1] [piping] further repeats of this error will be suppressed...
Here is the full output of npm run dev
. I ran npm install
immediately before this without any errors.
Donalds-MacBook:react-redux-universal-hot-example-master · npm run dev
> react-redux-universal-hot-example@0.9.0 dev /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
> concurrent --kill-others "npm run watch-client" "npm run start-dev" "npm run start-dev-api"
[0]
[0] > react-redux-universal-hot-example@0.9.0 watch-client /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
[0] > better-npm-run watch-client
[0]
[2]
[2] > react-redux-universal-hot-example@0.9.0 start-dev-api /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
[2] > better-npm-run start-dev-api
[2]
[1]
[1] > react-redux-universal-hot-example@0.9.0 start-dev /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
[1] > better-npm-run start-dev
[1]
[0] running better-npm-run in /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
[1] running better-npm-run in /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
[0] Executing script: watch-client
[0]
[0] to be executed: node webpack/webpack-dev-server.js
[2] running better-npm-run in /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master
[1] Executing script: start-dev
[1]
[1] to be executed: node ./bin/server.js
[2] Executing script: start-dev-api
[2]
[2] to be executed: node ./bin/api.js
[0] ==> 🚧 Webpack development server listening on port 3001
[2] ----
[2] ==> 🌎 API is running on port 3030
[2] ==> 💻 Send requests to http://localhost:3030
[1] [piping] can't execute file: /Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/bin/server.js
[1] [piping] error given was: Error: Cannot find module 'invariant'
[1] at Function.Module._resolveFilename (module.js:336:15)
[1] at Function._module3.default._resolveFilename (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/webpack-isomorphic-tools/node_modules/require-hacker/babel-transpiled-modules/require hacker.js:403:34)
[1] at Function.module._load (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/piping/lib/launcher.js:24:23)
[1] at Module.require (module.js:365:17)
[1] at require (module.js:384:17)
[1] at Object.<anonymous> (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/redux-router/node_modules/history/lib/createMemoryHistory.js:9:18)
[1] at Module._compile (module.js:460:26)
[1] at Module._extensions..js (module.js:478:10)
[1] at require.extensions.(anonymous function) (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/babel-core/lib/api/register/node.js:214:7)
[1] at Object._module3.default._extensions.(anonymous function) [as .js] (/Users/donaldpinkus/Desktop/react-redux-universal-hot-example-master/node_modules/webpack-isomorphic-tools/node_modules/require-hacker/babel-transpiled-modules/require hacker.js:250:71)
[1] [piping] further repeats of this error will be suppressed...
[0] Hash: d180dedaf2d5bc95580f
[0] Version: webpack 1.12.9
[0] Time: 12028ms
[0] Asset Size Chunks Chunk Names
[0] db812d8a70a4e88e888744c1c9a27e89.woff2 66.6 kB [emitted]
[0] f4769f9bdb7466be65088239c12046d1.eot 20.1 kB [emitted]
[0] fa2772327f55d8198301fdb8bcfc8158.woff 23.4 kB [emitted]
[0] e18bbf611f2a2e43afc071aa2f4e1512.ttf 45.4 kB [emitted]
[0] 89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
[0] 32400f4e08932a94d8bfd2422702c446.eot 70.8 kB [emitted]
[0] 448c34a56d699c29117adc64c43affeb.woff2 18 kB [emitted]
[0] a35720c2fed2c7f043bc7e4ffb45e073.woff 83.6 kB [emitted]
[0] a3de2170e4e9df77161ea5d3f31b2668.ttf 142 kB [emitted]
[0] f775f9cca88e21d45bebe185b27c0e5b.svg 366 kB [emitted]
[0] c29770d03d2e95e3ea5899d57c6cfeab.jpg 92.2 kB [emitted]
[0] main-d180dedaf2d5bc95580f.js 7.03 MB 0 [emitted] main
[0] webpack built d180dedaf2d5bc95580f in 12028ms
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
Cannot find module 'invariant' - react-native-cli #11327 - GitHub
Description. When trying to create a new react-native project there an error while installing packages. Reproduction.
Read more >Getting 'invarient' not found error on creating a react native ...
I tried the things mentioned in the documentation. But on running react-native init AwesomeProject . I m getting following error. module.js: ...
Read more >invariant - npm
Start using invariant in your project by running `npm i invariant`. There are 4961 other projects in the npm registry using invariant.
Read more >Cannot find module 'react' Error in TypeScript | bobbyhadz
To solve the "Cannot find module react or its corresponding type declarations" error, install the module and its type definitions by running the...
Read more >Cannot find module 'invariant' - react-native-cli - Bountysource
Description. When trying to create a new react-native project there an error while installing packages. Reproduction.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 I’ve (temporary) fixed it with
npm install invariant warning --save
Sweeet