Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Randy_Johnson's avatar

VueJS Webpack Issues!

Hello, I am following this tutorial 'https://www.youtube.com/watch?v=UHSipe7pSac&ab_channel=Scrypster' and in the tutorial he runs

npm run hot

Which responses with the error:

> hot
> cross-env NODE_ENV=development webpack-dev-server --inline --hot

CLI for webpack must be installed.
  webpack-cli (https://github.com/webpack/webpack-cli)

We will use "npm" to install the CLI via "npm install -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=14.18.0', npm: '>=8.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.15.1', npm: '7.20.0' }
npm WARN EBADENGINE }

up to date, audited 153 packages in 704ms

18 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Error: Cannot find module 'webpack-cli/package.json'
Require stack:
- C:\ProgramData\nvm\v16.15.1\node_modules\webpack-dev-server\bin\webpack-dev-server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at runCli (C:\ProgramData\nvm\v16.15.1\node_modules\webpack-dev-server\bin\webpack-dev-server.js:73:27)
    at C:\ProgramData\nvm\v16.15.1\node_modules\webpack-dev-server\bin\webpack-dev-server.js:168:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\ProgramData\nvm\v16.15.1\node_modules\webpack-dev-server\bin\webpack-dev-server.js'
  ]
}

PS

PS C:\Users\jdh\Documents\My Documents\Developement\laravel\todolist> npm run hot

> hot
> cross-env NODE_ENV=development webpack-dev-server --inline --hot

CLI for webpack must be installed.
  webpack-cli (https://github.com/webpack/webpack-cli)

We will use "npm" to install the CLI via "npm install -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no):

I type yes, but still having the above difficulties.

0 likes
2 replies
thinkverse's avatar
Level 15

Did you read the warning? It says it requires.

required: { node: '>=14.18.0', npm: '>=8.0.0' }

But it finds.

current: { node: 'v16.15.1', npm: '7.20.0' }

Something's not like the other. I.E the npm version seems to be older than what is required. Try updating your npm version to >=8.0.0 and try it again. I'd suggest installing it with the version range just to be sure it installs a version that's compatible.

npm install --global npm@">=8.0.0"

Please or to participate in this conversation.