Ionic2 packs this problem


#1

ionic build browser --prod

TypeError: Cannot read property ‘codeGen’ of undefined
TypeError: Cannot read property ‘codeGen’ of undefined
at Object.doCodegen (D:\DEV\WS\WS04\c8wap\node_modules@ionic\app-scripts\dist\aot\codegen.js:6:50)
at D:\DEV\WS\WS04\c8wap\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:42:30

npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “ionic:build” “–” “–prod” "–release"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! mLegend@ ionic:build: ionic-app-scripts build --webpack webpack.config.js "--prod" "--release"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mLegend@ ionic:build script ‘ionic-app-scripts build --webpack webpack.config.js “–prod” “–release”’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mLegend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build --webpack webpack.config.js “–prod” "–release"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mLegend
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls mLegend
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\DEV\WS\WS04\c8wap\npm-debug.log


#2

Output of running ionic info on the command line, please.