react-router-tutorial icon indicating copy to clipboard operation
react-router-tutorial copied to clipboard

Error: Cannot find module 'webpack' in lesson '12-navigating'

Open devellopah opened this issue 9 years ago • 3 comments
trafficstars

npm install went successfully npm start crushed with errors lesson12

devellopah avatar Aug 25 '16 00:08 devellopah

The problem here might be that webpack is not part of your dependencies so when you run npm install webpack is not installed when you run npm start.

As part of lesson 11 it says in the code block:

// make sure to import this
var webpack = require('webpack')

You might want to run npm i webpack --save.

I agree with you that it was not clear as part of lesson 11 to install webpack. A suggestion might be to add webpackas part of the first code block of that lesson and turn: npm install express if-env compression --save

into npm install express if-env compression webpack --save

If you have any other questions please let me know.

Andersos avatar Oct 12 '16 19:10 Andersos

yep it fixed it thanks but...now i have new issue ERROR in multi main Module not found: Error: Cannot resolve module 'babel-loader' in C:\Users\User\Desktop\tuts\react\react-router-tutorial\lessons\12-navigating @ multi main

devellopah avatar Oct 14 '16 23:10 devellopah

npm i babel-loader --save

Andersos avatar Oct 14 '16 23:10 Andersos