Error while npm Start
See original GitHub issueHi everyone, I’ve tried to setup mern-starter using NVM, tried using : [ + ] Node v6.3.1 and npm 3.10.3 (Latest) [ + ] Node v4.4.7 and npm 2.15.8 (LTS) on Ubuntu 16.04.1 (LTS).
I did a clean install by cloning the repo. On running “npm start” I get the following error. Any thoughts or workarounds would be appreciated.
module.js:327
throw err;
^
Error: Cannot find module '/media/manpreet/Media'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/lib/transformation/file/index.js:591
throw err;
^
Error: /media/manpreet/Media and Files/work projects/mern-starter/client/modules/App/App.js: Command failed: node /media/manpreet/Media and Files/work projects/mern-starter/node_modules/webpack/bin/webpack.js /media/manpreet/Media and Files/work projects/mern-starter/client/modules/App/App.css /tmp/.webpack.res.1469537186753_457444.js --config ./webpack.config.babel.js --bail
module.js:327
throw err;
^
Error: Cannot find module '/media/manpreet/Media'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
at checkExecSyncError (child_process.js:464:13)
at execSync (child_process.js:504:13)
at exports.default (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-plugin-webpack-loaders/lib/runWebPackSync.js:39:51)
at PluginPass.CallExpression (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-plugin-webpack-loaders/lib/plugin.js:101:60)
at newFn (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/visitors.js:301:19)
at NodePath._call (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:106:12)
at TraversalContext.visitQueue (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:167:16)
at TraversalContext.visitSingle (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:118:19)
at TraversalContext.visit (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:211:19)
at Function.traverse.node (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/index.js:161:17)
at NodePath.visit (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:116:19)
at TraversalContext.visitQueue (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:167:16)
at TraversalContext.visitMultiple (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:113:17)
at TraversalContext.visit (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:209:19)
at Function.traverse.node (/media/manpreet/Media and Files/work projects/mern-starter/node_modules/babel-core/node_modules/babel-traverse/lib/index.js:161:17)
[nodemon] app crashed - waiting for file changes before starting...
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
npm start giving error in node.js - Stack Overflow
The error suggests that the ./bin/www directory is not found. Paths specified with a dot are relative to the current directory, ...
Read more >npm ERR! Missing script: "start" [Solved] | bobbyhadz
To solve the npm ERR! Missing script: "start" error, make sure to add a start command to the scripts object in your package.json...
Read more >How to fix npm start command not working - Nathan Sebhastian
How to fix npm start command not working · Check if the package.json file exists · Check if the start script is defined...
Read more >npm err! missing script: start Solution - Career Karma
If you type npm start and get the npm err! missing script: start error, there must be a missing line in the script...
Read more >Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
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
Figured it out, it was due to my parent folder having a space in it’s name. Once I removed the space, it worked.
Hopefully, this helps out.
I twisted the runWebPackSync.js file a bit by allowing spaces on windows path, and it worked fine.