Angualr CLI commands not working after trying to upgrade to latest (webpack)
Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Windows
- Versions. Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here: All ng commands not working - Repro steps. Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
trying to upgrade from angular cli webpack 10 to 11
- The log given by the failure. Normally this include a stack trace and some more information.

It seems like it could be related to https://github.com/angular/angular-cli/issues/1883 ?
TL;DR: I think you need to update your Node to version 6.x.x.
Edit: Yip - updating Node from v4.x.x to v6.4.0 did the trick for me.
same here. working hard to fix my machine. I Need it to talk at a meetup about cli!!!!
Windows 10 Node V4.5.0 npm 3.8.7
Last command i tryed before it breaks was to install angular-cli 1.0.0-beta.11-webpack.3.
@solms Node Version greater 4 not working with node-sass!! I try to reinstall node.
Upgrading to node 6 resolved this issue but remains another

Reinstall node 4.5 doesn't solve the problm, intall node 6.5 doesn't solve th Problem!!
I get into Panic cause of the talk i give next week.
I fixed my machine npm install -g [email protected]
ng v
angular-cli: 1.0.0-beta.11-webpack.2
node: 4.5.0
os: win32 ia32 but now no .d.ts file found
Updating node to v6 also did work for me too, but another issue has risen, as @theunreal had:
Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at Object.getWebpackCommonConfig (C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular -cli\addon\ng2\models\webpack-build-common.ts:23:25) at new NgCliWebpackConfig (C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular-cli\ad don\ng2\models\webpack-config.ts:13:30) at Class.run (C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular-cli\addon\ng2\tasks \serve-webpack.ts:19:22) at C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular-cli\addon\ng2\commands\serve.t s:84:26 at process._tickCallback (internal/process/next_tick.js:103:7)
You should update your angular-cli.json file with the new version.
{
"project": {
"version": "1.0.0-beta.11-webpack.8",
"name": "ng2-cli-webpack-8"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": "assets",
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,
"styles": [
"styles.css"
],
"scripts": [],
"environments": {
"source": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"dev": "environments/environment.dev.ts"
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false,
"lazyRoutePrefix": "+"
}
}
Changed the version to "version": "1.0.0-beta.11-webpack.8", but same error
angular-cli: 1.0.0-beta.11-webpack.8 node: 6.5.0 os: win32 x64
Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at Object.getWebpackCommonConfig (C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular -cli\addon\ng2\models\webpack-build-common.ts:23:25) at new NgCliWebpackConfig (C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular-cli\ad don\ng2\models\webpack-config.ts:13:30) at Class.run (C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular-cli\addon\ng2\tasks \serve-webpack.ts:19:22) at C:\Projects\Team Projects Workspace\Workplace Suite - Angular\node_modules\angular-cli\addon\ng2\commands\serve.t s:84:26 at process._tickCallback (internal/process/next_tick.js:103:7)
Change the package.json. set TypeScript Version from ^2.0.0 to 2.0.0.
This solved my Problem
AND node Version v4.5
I was having the same problem; fixed it by updating theangular-cli.json carefully as suggested by @nhenneaux. Some attributes such styles or scripts are mandatory.
@manuelxtrem check for apps[0].styles in your angular-cli.json. It's what's making the build fail.
The latest beta.14 should have fixed these issues. See https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12 on how to update.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.