Skip to content

Cannot find module 'webpack/lib/RequestShortener' #2548

@th3n3wguy

Description

@th3n3wguy

Version

3.0.3

Reproduction link

https://github.com/vuejs/vue-cli

Node and OS info

Node 8.12.0 / NPM 6.4.1 / Windows 10

Steps to reproduce

  1. Create a new project using the steps at: https://cli.vuejs.org/guide/creating-a-project.html
  2. Choose the following features for a custom build:
  • Babel
  • Router
  • Vuex
  • CSS Pre-processors
  • Linter / Formatter
  • Unit Testing
  1. Choose these answers to each question in the CLI questions:
  • Use history mode for router? --- Yes
  • Pick a CSS pre-processor: --- Sass/SCSS
  • Pick a linter / formatter config: --- ESLint + Standard config
  • Pick additional lint features: --- Lint on Save
  • Pick a unit testing solution: --- Mocha + Chai
  • Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? --- In dedicated config files
  • Save this as a preset for future projects? --- N
  1. Run the following command: vue-cli-service serve --mode development

What is expected?

The Vue CLI should set the mode as development and serve the application.

What is actually happening?

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. (C:\codebase<>\src\ui\node_modules\friendly-errors-webpack-plugin\src\core\extractWebpackError.js:4:26)
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! <>@0.0.1 dev: vue-cli-service serve --mode development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <>@0.0.1 dev script.
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<>\AppData\Roaming\npm-cache_logs\2018-09-18T14_15_04_460Z-debug.log


If needed, I can provide the log file for additional details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue is missing a minimal runnable reproduction, provided by the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions