Cannot find module 'webpack'

Following the docs, wen I do ‘ionic serve’ I get:

∆ Compiling and bundling with Webpack…
There was an error loading webpack.config.js:

Error: Cannot find module 'webpack’
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/home/redowsan/myApp/webpack.config.js:2:15)
at Module._compile (module.js:398:26)
at Object.Module._extensions…js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)

Cannot find module ‘webpack’ (CLI v2.0.0-beta.15)

Your system information:

Cordova CLI: 5.4.1
Ionic Version: 2.0.0-alpha.45
Ionic CLI Version: 2.0.0-beta.15
Ionic App Lib Version: 2.0.0-beta.8
OS: /bin/sh: lsb_release: no se encontró la orden
Node Version: v5.3.0

(I’m using AntergOS Linux)

Run ‘npm install webpack --save-dev’ and try again

If you haven’t run ‘npm install’ after creating the project, do that first.

1 Like

it’s working now!! Thank you so much :wink: