Webpack-cli init not working

So I’m on the very last lecture of The Ultimate Javascript Series Part - 2, and the lecture is titled “Webpack”. I installed npm i -g webpack-cli@2.0.14 as intstructed, so far so good. Then I tried webpack-cli init and it’s giving me an error: TypeError: env.run(…).on is not a function.

Is anyone else having this problem???


I found this in a search, it seems like a good solution. Did you ever figure it out?

No I got frustrated and moved on to the React Course. While looking at the link you just sent I tried using

  • webpack-cli 3.3.11
  • then npm install -D @webpack-cli/init@0.2.2
    and neither one of them worked for me. I could try the same versions of npm and node but I’m afraid that’ll screw up all my Node.JS files.

Have you thought about recreating the problem on a virtual machine? That way you have no worries about messing something up. Good luck. I’m slammed with homework, otherwise, I’d help you troubleshoot. Good luck!