Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack-cli migrate webpack.config.js ERROR #541

Closed
RyaiStudio opened this issue Jul 9, 2018 · 12 comments
Closed

webpack-cli migrate webpack.config.js ERROR #541

RyaiStudio opened this issue Jul 9, 2018 · 12 comments

Comments

@RyaiStudio
Copy link

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
@ematipico
Copy link
Contributor

Hi! Thanks for filling the issue, please next time don't delete the template! Couple of questions:

  1. You didn't mention the file webpack.config.js in your problem, where does it come from?
  2. Why do you use migrate? Looks like you're creating a new project

@IzaGz
Copy link

IzaGz commented Jul 9, 2018

same problem

@IzaGz
Copy link

IzaGz commented Jul 9, 2018

i have tried to switch to version 2.1.1 - but go the
TypeError: Cannot read property 'length' of null
#542

@evenstensberg
Copy link
Member

Which version are you lads at? We need more information 👍

@IzaGz
Copy link

IzaGz commented Jul 11, 2018

this issue error happens on webpack-cli 308

@evenstensberg
Copy link
Member

Upgrade to version 3.1.2 and up, an update to the latest version would be the best for you! :)

@Dhruv56
Copy link

Dhruv56 commented Jul 17, 2018

@ev1stensberg I used following command.

npm i -D webpack-cli@latest

But it is still installing 3.0.8 version

@evenstensberg
Copy link
Member

Yep. I'll submit a fix shortly

@evenstensberg evenstensberg reopened this Jul 18, 2018
@evenstensberg
Copy link
Member

Fixed on master now. Will publish a new release once @dhruvdutt has fixed the breaking tests in bintestcases.

@xtx1130
Copy link

xtx1130 commented Jul 18, 2018

The same issue and I use:

"webpack-cli": "git+https://github.com/webpack/webpack-cli.git#master"

@DelfsEngineering
Copy link

Any update on this?

@ematipico
Copy link
Contributor

It's supposed to be resolved. If you still have this issue, please file a new issue with information of how to reproduce it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants