This question already has answers here:
How to ng serve an older Angular project?
(3 answers)
Closed 1 year ago.
I have just installed latest versions of Node.js (v14.16.1) and Angular (11.2).
Our TA gave us Angular project, but I cannot ng sever-it on my machine. I get following error:
An unhandled exception occurred: No projects support the 'serve' target.
See "C:\Users\Miljan\AppData\Local\Temp\ng-hVo6jS\angular-errors.log" for further details.
When I open the angular-errors.log, I have following output:
[error] Error: No projects support the 'serve' target.
at ServeCommand.initialize (C:\Users\Miljan\AppData\Roaming\npm\node_modules\#angular\cli\models\architect-command.js:58:19)
at async ServeCommand.validateAndRun (C:\Users\Miljan\AppData\Roaming\npm\node_modules\#angular\cli\models\command.js:127:9)
at async Object.runCommand (C:\Users\Miljan\AppData\Roaming\npm\node_modules\#angular\cli\models\command-runner.js:204:24)
at async default_1 (C:\Users\Miljan\AppData\Roaming\npm\node_modules\#angular\cli\lib\cli\index.js:80:31)
Here you can download Angular project which TA gave us.
And bellow is package.json from TA's project:
{
"name": "blog-client",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "^5.0.0",
"#angular/common": "^5.0.0",
"#angular/compiler": "^5.0.0",
"#angular/core": "^5.0.0",
"#angular/forms": "^5.0.0",
"#angular/http": "^5.0.0",
"#angular/platform-browser": "^5.0.0",
"#angular/platform-browser-dynamic": "^5.0.0",
"#angular/router": "^5.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"#angular/cli": "1.5.0",
"#angular/compiler-cli": "^5.0.0",
"#angular/language-service": "^5.0.0",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
Okay, I managed it.
First npm install, npm run-script build, finally ng serve.
This helped How to ng serve an older Angular project?
Related
ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.3.0 but 3.9.10 was found instead.
I am using
{
"name": "testUI",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"prod": "ng build --prod --build-optimizer",
"test": "ng test",
"lint": "ng lint > lintError.txt",
"e2e": "ng e2e",
"cli": "npm install --save #angular/cli#latest",
"whitesource": "whitesource run"
},
"private": true,
"dependencies": {
"#angular/animations": "^6.0.7",
"#angular/cdk": "^6.4.6",
"#angular/common": "^6.0.7",
"#angular/compiler": "^7.2.12",
"#angular/core": "^7.0.2",
"#angular/forms": "^6.0.7",
"#angular/http": "^6.0.7",
"#angular/material": "^6.4.6",
"#angular/platform-browser": "^6.0.7",
"#angular/platform-browser-dynamic": "^6.0.7",
"#angular/router": "^6.0.7",
"#ngx-translate/core": "^11.0.0",
"#ngx-translate/http-loader": "^3.0.1",
"angular2-busy": "^2.0.4",
"angular5-csv": "^0.2.11",
"chart.js": "2.9.4",
"core-js": "^2.5.7",
"date-and-time": "^0.14.2",
"hammerjs": "^2.0.8",
"primeicons": "^1.0.0-beta.10",
"primeng": "^6.1.5",
"rxjs": "6.3.3",
"zone.js": "^0.8.27"
},
"devDependencies": {
"#angular-devkit/build-angular": "~0.6.8",
"#angular/cli": "^7.1.4",
"#angular/compiler-cli": "^7.2.12",
"#angular/language-service": "^6.0.7",
"#types/jasmine": "~2.8.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^8.9.5",
"codelyzer": "~4.2.1",
"jasmine": "^3.2.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-firefox-launcher": "^1.1.0",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.2",
"rxjs-compat": "^6.2.1",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "^3.2.0"
}
My angular core version was 6 I want to upgrade to 7. So i updated few components like core, compiler to version 7. and I am facing this issue for TypeScript. I am giving typescript version as 3.2.0 but in my package-lock.json it is coming as 3.9.10.
I have a angular ( 9 ) project.
node --version : v12.16.1
npm --version : 6.14.5
When I try to build using "npm install" i get error
Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
The package.json file is given here
{
"name": "my-app",
"version": "1.1.1",
"scripts": {
"ng": "ng",
"start:dev": "ng serve --configuration=dev",
"start": "node server.js",
"build": "ng build --aot --prod --configuration=production",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "npm run build"
},
"private": true,
"dependencies": {
"#angular/animations": "^7.2.4",
"#angular/cdk": "~7.3.2",
"#angular/cli": "^7.3.1",
"#angular/common": "~7.2.0",
"#angular/compiler": "~7.2.0",
"#angular/core": "~7.2.0",
"#angular/forms": "~7.2.0",
"#angular/material": "^7.3.2",
"#angular/platform-browser": "~7.2.0",
"#angular/platform-browser-dynamic": "~7.2.0",
"#angular/router": "~7.2.0",
"#types/chart.js": "^2.7.45",
"angular4-hal": "^7.8.2",
"chart.js": "^2.7.3",
"core-js": "^2.5.4",
"express": "^4.16.4",
"hammerjs": "^2.0.8",
"moment": "^2.24.0",
"ngx-json-viewer": "^2.4.0",
"path": "^0.12.7",
"primeflex": "^1.0.0-rc.1",
"primeicons": "^1.0.0",
"primeng": "^7.1.0",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"typescript": "~3.2.2",
"zone.js": "~0.8.26"
},
"devDependencies": {
"#angular-devkit/build-angular": "^0.901.1",
"#angular/compiler-cli": "^9.1.1",
"#angular/language-service": "~7.2.0",
"#types/jasmine": "~2.8.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^8.9.5",
"codelyzer": "~4.5.0",
"enhanced-resolve": "^3.3.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.0.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0"
},
"engines": {
"node": "8.11.3",
"npm": "6.8.0"
}
}
I am a beginner to the MEAN stack framework. I am trying to run a node js server, using "nodemon server.js" command. But I get this error. I am trying to figure out why
Angular CLI: 9.1.3
Node: 12.4.0
Angular: 9.1.3
This is my package.json file
{
"name": "Angular-App",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"start:server": "nodemon server.js"
},
"private": true,
"dependencies": {
"#angular/animations": "^9.1.3",
"#angular/common": "^9.1.3",
"#angular/compiler": "^9.1.3",
"#angular/core": "^9.1.3",
"#angular/fire": "^6.0.0",
"#angular/forms": "^9.1.3",
"#angular/platform-browser": "^9.1.3",
"#angular/platform-browser-dynamic": "^9.1.3",
"#angular/router": "^9.1.3",
"bootstrap": "^4.4.1",
"core-js": "^3.6.5",
"express": "^4.17.1",
"firebase": "^7.14.2",
"jquery": "^3.5.0",
"ngx-bootstrap": "^5.6.1",
"rxjs": "~6.5.5",
"tslib": "^1.10.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"#angular-devkit/build-angular": "^0.901.3",
"#angular/cli": "^9.1.3",
"#angular/compiler-cli": "^9.1.3",
"#angular/language-service": "^9.1.3",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"nodemon": "^2.0.3",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "^3.8.3"
}
}
These are my versions
Please help, I am stuck in my project here
I've cloned an existing project in Angular 8. I run npm install and next ng serve, getting the error. I've tried some possible fixes related to webpack but none of them worked.
Angular CLI v8.3.18 and node v10.16.0
package.json:
{
"name": "backoffice",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "~8.2.8",
"#angular/common": "~8.2.8",
"#angular/compiler": "~8.2.8",
"#angular/core": "~8.2.8",
"#angular/forms": "~8.2.8",
"#angular/platform-browser": "~8.2.8",
"#angular/platform-browser-dynamic": "~8.2.8",
"#angular/router": "~8.2.8",
"angular-cli": "^1.0.0-beta.28.3",
"ng2-file-upload": "^1.4.0",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"#angular-devkit/build-angular": "~0.803.6",
"#angular/cli": "~8.3.6",
"#angular/compiler-cli": "~8.2.8",
"#angular/language-service": "~8.2.8",
"#types/node": "~8.9.4",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
}
}
These are the steps I've followed:
1. Installed Node Js
2. npm install -g #angular/cli
3. In F:/Angular -> ng new hellowworldapp
4. In F:/Angular/hellowworldapp -> ng serve
When I open http://localhost:4200/ I'm getting this error in the browser:
Cannot GET /**
Then I've tried to uninstall and reinstall but I still have no clue what's happening.
Thanks in advance.
View Compile success Screenshot here
My package.json file is:
{
"name": "hellowworldapp",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "^6.0.0-rc.1",
"#angular/common": "^6.0.0-rc.1",
"#angular/compiler": "^6.0.0-rc.1",
"#angular/core": "^6.0.0-rc.1",
"#angular/forms": "^6.0.0-rc.1",
"#angular/http": "^6.0.0-rc.1",
"#angular/platform-browser": "^6.0.0-rc.1",
"#angular/platform-browser-dynamic": "^6.0.0-rc.1",
"#angular/router": "^6.0.0-rc.1",
"core-js": "^2.5.4",
"rxjs": "^6.0.0-rc.0",
"zone.js": "^0.8.24"
},
"devDependencies": {
"#angular/compiler-cli": "^6.0.0-rc.1",
"#angular-devkit/build-angular": "~0.5.0",
"typescript": "~2.7.2",
"#angular/cli": "~6.0.0-rc.4",
"#angular/language-service": "^6.0.0-rc.1",
"#types/jasmine": "~2.8.6",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1"
}
}