Angular-cli: Using Angular 2.3.0 with Latest CLI - Serve/Build Fails

Created on 8 Dec 2016  Â·  9Comments  Â·  Source: angular/angular-cli

Please provide us with the following information:

OS?

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

Windows 10 Enterprise

Versions.

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

NPM v4.0.5
Node v7.0

Repro steps.

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

This is a brand new project using CLI version 22-1 but also npm linked with Master.

The log given by the failure.

Normally this include a stack trace and some more information.

** NG Live Development Server is running on http://localhost:4200. **
 10% building modules 2/2 modules 0 activecan't resolve module ./directives from C:/Code Projects/Web/request-it/node_modules/@angular/forms/src/form_providers.d.ts
 20% building modules 88/88 modules 0 activeTerminate batch job (Y/N)?

Mention any other details that might be useful.

I also filed this issue in the main Angular Repo but they seem to be saying it might be a problem with the CLI. The issue is here: https://github.com/angular/angular/issues/13308


Thanks! We'll be in touch soon.

Most helpful comment

It seems like it'd be considerably less confusing if Issues were left open for these sorts of things. We can't see your internal tracking.

I'm going to explicitly cross post this Issue in the other one that has had 13 :thumbsup: in the last ~12 hours for this problem.

All 9 comments

I'm seeing the same issue, but with a different error. This is with a brand new project, with the Angular dependencies updated:

➜  testing git:(master) ✗ ng serve
ngCompiler.ReflectorHost is not a constructor
TypeError: ngCompiler.ReflectorHost is not a constructor
    at AotPlugin._setupOptions (/Users/John/Dev/Javascript/Angular/testing/node_modules/@ngtools/webpack/src/plugin.js:136:31)
    at new AotPlugin (/Users/John/Dev/Javascript/Angular/testing/node_modules/@ngtools/webpack/src/plugin.js:37:14)
    at Object.exports.getWebpackNonAotConfigPartial (/Users/John/Dev/Javascript/Angular/testing/node_modules/angular-cli/models/webpack-bu
ild-typescript.js:20:13)
    at new NgCliWebpackConfig (/Users/John/Dev/Javascript/Angular/testing/node_modules/angular-cli/models/webpack-config.js:23:42)
    at Class.run (/Users/John/Dev/Javascript/Angular/testing/node_modules/angular-cli/tasks/serve-webpack.js:20:22)
    at /Users/John/Dev/Javascript/Angular/testing/node_modules/angular-cli/commands/serve.js:102:26
    at process._tickCallback (internal/process/next_tick.js:103:7)
➜  testing git:(master) ✗

FWIW, My package.json dependencies are:

"dependencies": { "@angular/common": "2.3.0", "@angular/compiler": "2.3.0", "@angular/core": "2.3.0", "@angular/forms": "2.3.0", "@angular/http": "2.3.0", "@angular/platform-browser": "2.3.0", "@angular/platform-browser-dynamic": "2.3.0", "@angular/router": "3.3.0", "core-js": "^2.4.1", "rxjs": "5.0.0-rc.4", "ts-helpers": "^1.1.1", "zone.js": "^0.7.2" }, "devDependencies": { "@angular/compiler-cli": "2.3.0", "@types/jasmine": "2.5.38", "@types/node": "^6.0.42", "angular-cli": "1.0.0-beta.22-1", "codelyzer": "~2.0.0-beta.1", "jasmine-core": "2.5.2", "jasmine-spec-reporter": "2.5.0", "karma": "1.2.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-remap-istanbul": "^0.2.1", "protractor": "4.0.9", "ts-node": "1.7.0", "tslint": "^4.0.2", "typescript": "~2.0.10", "webdriver-manager": "10.2.5" }

this one is related to issue #3241 maybe caused by this commit

Yes! That would be it. I hope they are able to fix it soon.

We are looking at solving this issue, but I'll close it as it's tracked internally.

You will notice that we fixed the version of Angular that we support in the CLI. This was on purpose. Once that fix is in we will unlock the version of angular again.

In the meantime, please use 2.2.4.

It seems like it'd be considerably less confusing if Issues were left open for these sorts of things. We can't see your internal tracking.

I'm going to explicitly cross post this Issue in the other one that has had 13 :thumbsup: in the last ~12 hours for this problem.

There is no @angular/common 2.3.0 in npm repo. The latest one is 2.2.4.

I was able to get the angular 2.3.0 working downgrading the angular-cli from version [email protected] to version [email protected]. Now the error gone.

I also had to npm i awesome-typescript-loader after downgrading to [email protected]

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._

Was this page helpful?
0 / 5 - 0 ratings