3.0.3
https://github.com/vuejs/vue-cli
Node 8.12.0 / NPM 6.4.1 / Windows 10
The Vue CLI should set the mode as development and serve the application.
The following error / stacktrace is thrown / shown:
vue-cli-service serve --mode development
INFO Starting development server...
ERROR Error: Cannot find module 'webpack/lib/RequestShortener'
Error: Cannot find module 'webpack/lib/RequestShortener'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <vue-cli-service serve --mode development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\<
If needed, I can provide the log file for additional details.
It would be easier for us to replicate the problem. If you provided a repository with a reproduction.
Your instructions, for example, don't mention which css pre processor etc. you chose.
@LinusBorg => We can go ahead and close this issue. I apologize for opening it. I am not sure of the reason, but the issue seems to have been resolved after I deleted the node_modules directory and the package-lock.json file and re-ran the NPM installation process.
I appreciate you taking the time to respond!
I just came across this error in a typescript create-react-app.
Then you should probably post in their repository.
For me too, the issue seems to have been resolved after I deleted the node_modules directory and the package-lock.json file
Maybe its time to switch to yarn?
Just in case you think it was a one-off. Its likely to pop up again in Vue.
Most helpful comment
@LinusBorg => We can go ahead and close this issue. I apologize for opening it. I am not sure of the reason, but the issue seems to have been resolved after I deleted the
node_modulesdirectory and thepackage-lock.jsonfile and re-ran the NPM installation process.I appreciate you taking the time to respond!