shanely's avatar

Error: spawn node_modules/webpack/bin/webpack.js ENOENT

Hi I am in windows 10 when I issue the command npm run dev. it shows error

Error: spawn node_modules/webpack/bin/webpack.js ENOENT

at notFoundError (C:\wamp\www\myproj\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:11:11) at verifyENOENT (C:\wamp\www\myproj\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:46:16) at ChildProcess.cp.emit (C:\wamp\www\myproj\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:33:19) at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Thank you in advance.

0 likes
6 replies
Cronix's avatar

make sure you have the cross-env package installed via npm.

probably_joe's avatar

I am getting an identical error. I'm new to node.js, but I'm pretty sure that I have cross-env installed globally. I am only trying out some Laracast videos right now, so I have tried using node ver 6.11.0 and 8.1.2 to see if that might be that issue and I get the same error for each version.

$ npm ls -g C:\Users\Cottongim\AppData\Roaming\npm +-- [email protected] +-- [email protected] | +-- [email protected] | | +-- [email protected] | | | +-- [email protected] | | | -- [email protected] | | +-- [email protected] | | |-- [email protected] | | -- [email protected] | |-- [email protected] | `-- [email protected] ...

shanely's avatar

@probably_joe ,

I fixed mine here... install the latest node.js or LTS 6 above version...then delete your node_modules , and then install back using npm install , then you can now npm run dev.. with no error.

hope it helps.

probably_joe's avatar

Thanks @shanely. I tried removing and installing without any luck, but finally noticed that it was webkit that was missing from the modules for the app. I am now getting a dependency error for the app.js and app.scss files even though they are clearly in the folders. I'll start a new topic for that.

shanely's avatar

@probably_joe ,

you did not delete the folder node_modules ? before running again the command npm install ?

probably_joe's avatar

I did, but I think I was initially deleting the wrong node_modules folder because when I tried to run npm install afterwards, it couldn't find a necessary file to run. Anyway, after a new install of node, then adding webkit to the project, it seems to have worked as for as the modules are concerned.

Please or to participate in this conversation.