I have errors with npm run dev, I made a npm rebuild, then a npm install, to try again with npm run dev, and it shows me these errors:
# npm run dev
> [email protected] dev c:\xampp\htdocs\site
> cross-env NODE_ENV=development webpack-dev-server --open --inline --hot
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'hard-source-webpack-plugin'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (c:\xampp\htdocs\site\webpack.config.js:3:31)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: 'cross-env NODE_ENV=development webpack-dev-server --open --inline --hot'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\Desk\AppData\Roaming\npm-cache\_logs18-07-12T04_14_16_402Z-debug.log
How can I solve it? By google I did not find a solution to repair the error, thanks.