angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

core_1.Version is not a constructor issue

Open anand-ma opened this issue 9 years ago • 2 comments

Please provide us with the following information:

OS?

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

Versions.

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

C:\Users*\Workspace*\shared\firstnet-shared>node --version v6.6.0 C:\Users**\Workspace***\shared\firstnet-shared>npm --version 3.10.3

Repro steps.

Tried to update to latest CLI version following the steps in the github repo to a T.

The log given by the failure.

ng -v core_1.Version is not a constructor TypeError: core_1.Version is not a constructor at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules@angular\compiler-cli\src\version.js:18:19) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules@angular\compiler-cli\index.js:24:17) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules@ngtools\webpack\src\plugin.js:5:22) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules@ngtools\webpack\src\index.js:6:10) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules\angular-cli\models\webpack-build-typescript.js:3:17) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules\angular-cli\models\webpack-config.js:2:34) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (C:\Users*\Workspace*\shared\firstnet-shared\node_modules\angular-cli\tasks\build-webpack.js:6:24) at Module._compile (module.js:556:32)

Mention any other details that might be useful.

{ "name": "***", "version": "0.0.0", "license": "MIT", "angular-cli": {}, "scripts": { "ng": "ng", "start": "ng serve", "lint": "tslint "src/**/.ts"", "test": "ng test", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "protractor" }, "private": true, "dependencies": {
"@angular/common": "2.0.0", "@angular/compiler": "2.0.0", "@angular/core": "2.0.0", "@angular/forms": "2.0.0", "@angular/http": "2.0.0", "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", "core-js": "^2.4.1", "intl": "^1.2.5", "ng2-translate": "^2.5.0", "rxjs": "5.0.0-beta.12", "ts-helpers": "^1.1.1", "zone.js": "^0.6.23" }, "devDependencies": { "karma-phantomjs-launcher": "^1.0.2", "phantomjs-prebuilt": "^2.1.14", "karma-phantomjs-launcher": "^1.0.2", "@angular/compiler-cli": "^2.3.1", "@types/jasmine": "2.5.38", "@types/node": "^6.0.42", "angular-cli": "1.0.0-beta.24", "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.13", "ts-node": "1.2.1", "tslint": "^4.0.2", "typescript": "~2.0.3"
} }


Thanks! We'll be in touch soon.

anand-ma avatar Jan 06 '17 22:01 anand-ma

Hi. It seems like you're using Beta.24 of the CLI, but Angular 2.0.0? Beta.24 is not compatible with Angular below 2.3.1, I'm sorry.

Upgrade to 2.3.1 or downgrade the CLI to Beta.21. Unfortunately you won't be able to use the latest version of the CLI if you don't want to upgrade Angular itself.

hansl avatar Jan 06 '17 23:01 hansl

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.