Im trying to install webpack to use in my project, but I get this error and I can't figure out how I could fix it. Any suggestions? I tried intalling webpack, webpack-cli globally and locally too.
module.js:540
throw err;
^
Error: Cannot find module 'webpack/schemas/WebpackOptions.json'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (/Users/macpro/Documents/sites/colo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous>
(/Users/macpro/Documents/sites/colo/node_modules/webpack-cli/bin/config-yargs.js:1:85)
at Module._compile (/Users/macpro/Documents/sites/colo/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
I solved this exact issue by explicitly installing webpack version 4.8.2 locally. Seems like some dependency mapping issues between the latest version of webpack-cli and webpack version 4.8.3
npm install [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With