简体   繁体   中英

Cannot run Webpack Intro - webpack-dev-server

I worked through the introduction at https://angular.io/docs/ts/latest/guide/webpack.html and I am able to build and run in production mode. I am having trouble getting the dev mode I get

webpack-dev-server --inline --progress --port 8080

70% 1/1 build modulesC:\angular2-webpack\node_modules\webpack\lib\NormalModuleFactory.js:72
                   var elements = request.replace(/^-?!+/, "").replace(/!!+/g, "!").split("!");
                                         ^
ypeError: Cannot read property 'replace' of undefined

Any pointers here will be helpful

Please try to run it by removing --inline from the above command in dev mode. I also faced the same problem but it worked for me when I tried running it without --inline in dev mode..

The webpack.config.js was missing! Pull latest and try again. Mine started working.

Refer This for the issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM