question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Cannot find module" when running npm start for v2.0.0 on Windows 10

See original GitHub issue

Hi all, I am running Node v6.2.2 and npm 3.9.6 on Windows 10 Preview build 14366.

I did a clean install of the starter repo - both by cloning the repo and also using the CLI, which apparently now uses v2.0.0. When I hit “npm start” I get the following error. It seems like there is some issue with how file paths are setup.

I’m new to the JavaScript tooling space so I’m not sure how to debug. Any thoughts or workarounds would be appreciated.


module.js:442
    throw err;
    ^

Error: Cannot find module 'C:\Users\Jacob\OneDrive\Documents\mern-app\C\:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\webpack\bin\webpack.js'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-core\lib\transformation\file\index.js:591
      throw err;
      ^

Error: C:/Users/Jacob/OneDrive/Documents/mern-app/client/modules/App/App.js: Command failed: node C\:\\Users\\Jacob\\OneDrive\\Documents\\mern-app\\node_modules\\webpack\\bin\\webpack.js C\:\\Users\\Jacob\\OneDrive\\Documents\\mern-app\\client\\modules\\App\\App.css C\:\\Users\\Jacob\\AppData\\Local\\Temp\\.webpack.res.1466494094898_296377.js --config ./webpack.config.babel.js --bail
module.js:442
    throw err;
    ^

Error: Cannot find module 'C:\Users\Jacob\OneDrive\Documents\mern-app\C\:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\webpack\bin\webpack.js'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3

    at checkExecSyncError (child_process.js:486:13)
    at execSync (child_process.js:526:13)
    at exports.default (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-plugin-webpack-loaders\lib\runWebPackSync.js:41:51)
    at PluginPass.CallExpression (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-plugin-webpack-loaders\lib\plugin.js:93:60)
    at newFn (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\visitors.js:310:19)
    at NodePath._call (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\path\context.js:78:18)
    at NodePath.call (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\path\context.js:49:17)
    at NodePath.visit (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\path\context.js:108:12)
    at TraversalContext.visitQueue (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\context.js:174:16)
    at TraversalContext.visitSingle (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\context.js:124:19)
    at TraversalContext.visit (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\context.js:219:19)
    at Function.traverse.node (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\index.js:171:17)
    at NodePath.visit (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\path\context.js:118:43)
    at TraversalContext.visitQueue (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\context.js:174:16)
    at TraversalContext.visitMultiple (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\context.js:119:17)
    at TraversalContext.visit (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\context.js:217:19)
    at Function.traverse.node (C:\Users\Jacob\OneDrive\Documents\mern-app\node_modules\babel-traverse\lib\index.js:171:17)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
somuscommented, Jun 23, 2016

@SOSANA Merged. 👍

2reactions
pointnetcommented, Jun 23, 2016

@SOSANA Awesome! @somus You’re welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR MODULE NOT FOUND whenever I try to run 'npm run ...
js and tried to access the module node is looking for but it doesn't exist so idk. Error: Cannot find module 'C:\Users\jaydev\Documents\ ...
Read more >
Missing modules when running npm run build or npm install
I have cloned the preexisting repository howoever every time I run pretty much any npm command I get the following output: foundationpress@2 ......
Read more >
node-windows - npm
Start using node-windows in your project by running `npm i node-windows`. ... node-windows does not use native modules.
Read more >
pcf-scripts - Cannot find module "Typescript...
log The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run build" terminated with exit code: 1. I ...
Read more >
Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found