I'm updating a webpack.config.js using and this command webpack-cli migrate weebpack.config.js
I'm starting a new project with webpack mini test sample so
I create a directory and run npm init then run npm i webpack --save-dev
I install webpack-cli npm i webpack-cli then i run webpack init automatically install a new webpack.dev.js
I run webpack-cli migrate webpack.config.js this pop the error
C:\Users\Spiralytics04\Desktop\webpack-sample-cli\node_modules\@webpack-cli\migrate\index.js:11
const { validate } = process.webpackModule;`
^
TypeError: Cannot destructure property `validate` of 'undefined' or 'null'.
at Object.<anonymous> (C:\Users\Spiralytics04\Desktop\webpack-sample-cli\node_modules\@webpack-cli\migrate\index.js:11:30)
at Module._compile (C:\Users\Spiralytics04\Desktop\webpack-sample-cli\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)
at Module.require (module.js:587:17)
at require (C:\Users\Spiralytics04\Desktop\webpack-sample-cli\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at promptForInstallation (C:\Users\Spiralytics04\Desktop\webpack-sample-cli\node_modules\webpack-cli\bin\prompt-command.js:108:3)
at C:\Users\Spiralytics04\Desktop\webpack-sample-cli\node_modules\webpack-cli\bin\cli.js:45:37
Hi! Thanks for filling the issue, please next time don't delete the template! Couple of questions:
same problem
i have tried to switch to version 2.1.1 - but go the
TypeError: Cannot read property 'length' of null
https://github.com/webpack/webpack-cli/issues/542
Which version are you lads at? We need more information 馃憤
this issue error happens on webpack-cli 308
Upgrade to version 3.1.2 and up, an update to the latest version would be the best for you! :)
@ev1stensberg I used following command.
npm i -D webpack-cli@latest
But it is still installing 3.0.8 version
Yep. I'll submit a fix shortly
Fixed on master now. Will publish a new release once @dhruvdutt has fixed the breaking tests in bintestcases.
The same issue and I use:
"webpack-cli": "git+https://github.com/webpack/webpack-cli.git#master"
Any update on this?
It's supposed to be resolved. If you still have this issue, please file a new issue with information of how to reproduce it
Most helpful comment
The same issue and I use: