Hi i have very strange problem, before run comand
sudo npm install
in angular 5 project, i can creating modules, components, and services via ng. After:
sudo npm install
When i want to create for example service:
sudo ng generate service myName
I get error:
Error: classify is not defined, classify is not defined
Version node: 9.5.0
Version npm: 5.6.0
Angular CLI: 1.7.1
Angular: 5.2.6
My package.json:
"@angular/cli": "^1.6.5",
"@angular-devkit/schematics": "0.0.42",
"@angular-devkit/core": "0.0.23",
"@angular/compiler-cli": "^5.2.1",
"@angular/language-service": "^5.2.1",
"@types/jasmine": "^2.8.5",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^6.0.96",
"codelyzer": "^4.1.0",
"jasmine-core": "^2.9.1",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^1.7.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.3",
"karma-jasmine": "^1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "^3.3.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
Thanks for help.
I just ran into this issue, and updating Angular DevKit worked for me:
$ npm i -D @angular-devkit/core@latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With