x)
- [x] new
- [x] build
- [x] serve
- [x] test
- [x] e2e
- [x] generate
- [x] add
- [x] update
- [x] lint
- [x] xi18n
- [x] run
- [x] config
- [x] help
- [x] version
- [x] doc
Yes, ng command stop working
on run ng i've got:
Cannot read property 'NoopAnalytics' of undefined
TypeError: Cannot read property 'NoopAnalytics' of undefined
at new Command (*/node_modules/@angular/cli/models/command.js:21:68)
at new ArchitectCommand (*/node_modules/@angular/cli/models/architect-command.js:22:9)
at new RunCommand (*/node_modules/@angular/cli/commands/run-impl.js:11:1)
at Object.runCommand (*/node_modules/@angular/cli/models/command-runner.js:172:25)
at async default_1 (*/node_modules/@angular/cli/lib/cli/index.js:32:31)
updated from 7 to 8
Cannot read property 'NoopAnalytics' of undefined
TypeError: Cannot read property 'NoopAnalytics' of undefined
at new Command (*/node_modules/@angular/cli/models/command.js:21:68)
at new ArchitectCommand (*/node_modules/@angular/cli/models/architect-command.js:22:9)
at new RunCommand (*/node_modules/@angular/cli/commands/run-impl.js:11:1)
at Object.runCommand (*/node_modules/@angular/cli/models/command-runner.js:172:25)
at async default_1 (*/node_modules/@angular/cli/lib/cli/index.js:32:31)
I can't ng don't work :), so here is my package.json:"dependencies": {
"@nrwl/angular": "8.0.0",
"@angular/animations": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@angularclass/hmr": "^2.1.3",
"@betadigitalproduction/ngx-platform-service": "^1.0.7",
"@ngqp/core": "^1.0.0",
"@ngrx/effects": "^7.4.0",
"@ngrx/entity": "^7.4.0",
"@ngrx/router-store": "^7.4.0",
"@ngrx/schematics": "^7.4.0",
"@ngrx/store": "^7.4.0",
"@ngrx/store-devtools": "^7.4.0",
"@ngx-pwa/local-storage": "8.0.0",
"@ngx-translate/core": "11.0.1",
"@sentry/browser": "5.3.0",
"core-js": "^3.1.3",
"date-fns": "^2.0.0-alpha.27",
"localize-router": "2.0.0-RC.2",
"ng-svg-icon-sprite": "1.6.0",
"ng-zorro-antd": "^7.4.1",
"ngx-build-plus": "8.0.0-rc.3.0.1",
"nprogress": "^0.2.0",
"rxjs": "6.5.2",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@nrwl/workspace": "8.0.0",
"@nrwl/jest": "8.0.0",
"@nrwl/cypress": "8.0.0",
"@angular-devkit/build-angular": "~0.800.1",
"@angular-devkit/build-ng-packagr": "~0.800.1",
"@angular/cli": "8.0.1",
"@angular/compiler-cli": "~8.0.0",
"@angular/language-service": "^8.0.0",
"@betalabs/ngx-observable-input": "^0.1.8",
"@betalabs/ngx-take-until-destroy": "^0.1.9",
"@biesbjerg/ngx-translate-extract": "2.3.4",
"@ngrx/store-devtools": "7.4.0",
"@types/jest": "24.0.13",
"@types/jquery": "3.3.29",
"@types/node": "~12.0.4",
"@types/webpack": "^4.4.31",
"codelyzer": "^5.0.1",
"conventional-changelog-cli": "2.0.21",
"cypress": "3.3.1",
"cz-conventional-changelog": "2.1.0",
"dotenv": "8.0.0",
"jest": "24.8.0",
"jest-preset-angular": "7.1.1",
"junit": "^1.4.9",
"mocha-junit-reporter": "^1.22.0",
"ng-packagr": "^5.2.0",
"ngrx-store-freeze": "0.2.4",
"prettier": "1.17.1",
"svg-sprite-generator": "0.0.7",
"ts-jest": "24.0.2",
"ts-node": "~8.2.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"tslint": "~5.17.0",
"typescript": "3.5.1"
}
Can you check what version the globally installed @angular/cli is on your system?
@clydin 8.0.1 ofcourse.
Reproduced on my windows pc (first seen on the latest mac)
馃 I just got the same error, happening here. Looks like as if the imported analytics object is not defined which is really strange. When I generate a new v7 project and upgrade, the error doesn't happen. Happens when I upgrade my nrwl/nx based project. Maybe NX changes that part of the upgrade process? @FrozenPandaz any insights here?
I have these devkit dependencies
"@angular-devkit/build-angular": "~0.13.1",
"@angular-devkit/build-ng-packagr": "^0.12.0",
"@angular-devkit/schematics": "^7.1.4",
"@angular/cli": "^7.3.7",
"@angular/compiler-cli": "^7.1.1",
// update
The error also happens when I start the app (after the failed upgrade, which looks like it completed). Removed @angular-devkit/schematics and the error disappears, getting #14557 now 馃槄. I'll give it a closer look the next days
same issue here, on centos 7
@juristr @FrozenPandaz same to me. I'm getting stuck with NX migration from 7 to 8.

+1 for being related to nrwl/nx project upgrading from cli@7 to 8. I don't have @angular-devkit/schematics listed in package.json, but I still see the same error.
I had success getting rid of this message by clearing my node modules folder and re-installing.
exact steps I took were rm -rf node_modules then yarn to re-install the deps. yours obviously may be different because of packager etc.
hope that helps
thanks @JoshDSommer.
My issue was the a mismatch on the global dependencies installed for @angular/cli.
This issue can be closed.
@lorenjerickson @juristr @yishain11 @glebmachine can you confirm if matching versions between local & global CLI resolves the issue?
Nope!
Also, i've updated to 8.0.3, and error still there : (
@mgechev it didn't solve the issue for me
For us, it helped to remove the local node_modules prior to npm install.
I met this issue also after I upgraded to v8. I debugged a little, seems the v8 cli invokes the @angular-devkit/core@7, then it cannot find the NoopAnalytics, so I reinstalled the @angular-devkit/core again, then this error was gone.
Where was the old version of @angular-devkit/core? In the workspace node_modules or in a top-level directory?
@mgechev I have the old @angular/[email protected] installed globally, for the workspace, I installed v8 of @angular/core related and @angular/cli related packages, I don't know why, but when running the cli under the workspace, seems it invokes the v8 cli correctly, but didn't find the v8 @angular-devkit/core.
package manager: yarn
Everything is ok now
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._
Most helpful comment
馃 I just got the same error, happening here. Looks like as if the imported
analyticsobject is not defined which is really strange. When I generate a new v7 project and upgrade, the error doesn't happen. Happens when I upgrade my nrwl/nx based project. Maybe NX changes that part of the upgrade process? @FrozenPandaz any insights here?I have these devkit dependencies
// update
The error also happens when I start the app (after the failed upgrade, which looks like it completed). Removed
@angular-devkit/schematicsand the error disappears, getting #14557 now 馃槄. I'll give it a closer look the next days