angular-cli: Error after Updating - Cannot read property 'parse' of undefined

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

10

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.22-1 node: 6.2.1 os: win32 x64

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

Created with Angular CLI. I recently updated the angular version and angular-cli version

The log given by the failure.

Normally this include a stack trace and some more information.

`ng serve

can’t resolve module @angular/core/src/di/opaque_token from C:\Users\Luca\dev\taboozy\src\index.ts Cannot read property ‘parse’ of undefined TypeError: Cannot read property ‘parse’ of undefined at ReflectorHost.normalizeAssetUrl (C:\Users\Luca\dev\taboozy\node_modules@angular\compiler-cli\src\reflector_host.js:54:43) at ReflectorHost.findDeclaration (C:\Users\Luca\dev\taboozy\node_modules@angular\compiler-cli\src\reflector_host.js:151:33) at StaticReflector.initializeConversionMap (C:\Users\Luca\dev\taboozy\node_modules@angular\compiler-cli\src\static_reflector.js:145:38) at new StaticReflector (C:\Users\Luca\dev\taboozy\node_modules@angular\compiler-cli\src\static_reflector.js:42:14) at AotPlugin._setupOptions (C:\Users\Luca\dev\taboozy\node_modules@ngtools\webpack\src\plugin.js:137:27) at new AotPlugin (C:\Users\Luca\dev\taboozy\node_modules@ngtools\webpack\src\plugin.js:37:14) at Object.exports.getWebpackNonAotConfigPartial (C:\Users\Luca\dev\taboozy\node_modules\angular-cli\models\webpack-build-typescript.js:20:13) at new NgCliWebpackConfig (C:\Users\Luca\dev\taboozy\node_modules\angular-cli\models\webpack-config.js:23:42) at Class.exports.default.Task.extend.run (C:\Users\Luca\dev\taboozy\node_modules\angular-cli\tasks\serve-webpack.js:20:22) at C:\Users\Luca\dev\taboozy\node_modules\angular-cli\commands\serve.js:102:26 at process._tickCallback (internal/process/next_tick.js:103:7)`

Mention any other details that might be useful.

I upgraded from version 1.0.0-beta.19 and upgrade angular version from 2.1.1 to 2.3


Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 10
  • Comments: 22 (2 by maintainers)

Most upvoted comments

It seems angular-cli 1.0.0-beta.22+ not supporting angular 2.3+; I think this issue will be fixed in next updates, so until that time, in package.json, reset all angular dependencies to be as the following “@angular/common”: “~2.2.0”, “@angular/compiler”: “~2.2.0”, “@angular/core”: “~2.2.0”, “@angular/forms”: “~2.2.0”, “@angular/http”: “~2.2.0”, “@angular/platform-browser”: “~2.2.0”, “@angular/platform-browser-dynamic”: “~2.2.0”,

then, npm i npm --save

Hi, I am also getting the same error after upgrading from Angular 2.2.x to 2.3.1. I upgraded with npm update --save

angular-cli: 1.0.0-beta.22-1 node: 6.6.0 os: win32 x64