I'm trying to run tutorials from angular.io. I'm getting an error on npm start. Here is the error. I tried to uninstal all npm, typescript, node, angular. First part of the error:
npm WARN invalid config loglevel="notice"
> angular-quickstart@1.0.0 build C:\Users\Gia\quickstart
> tsc -p src/
src/app/app.component.spec.ts(3,50): error TS2307: Cannot find module '@angular/core/testing'.
src/app/app.component.spec.ts(4,30): error TS2307: Cannot find module '@angular/platform-browser'.
src/app/app.component.spec.ts(5,30): error TS2307: Cannot find module '@angular/core'.
src/app/app.component.spec.ts(7,1): error TS2304: Cannot find name 'describe'.
src/app/app.component.spec.ts(12,3): error TS2304: Cannot find name 'beforeEach'.
src/app/app.component.spec.ts(19,3): error TS2304: Cannot find name 'beforeEach'.
src/app/app.component.spec.ts(25,3): error TS2304: Cannot find name 'it'.
src/app/app.component.spec.ts(25,39): error TS2304: Cannot find name 'expect'.
src/app/app.component.spec.ts(27,3): error TS2304: Cannot find name 'it'.
src/app/app.component.spec.ts(30,5): error TS2304: Cannot find name 'expect'.
src/app/app.component.ts(1,27): error TS2307: Cannot find module '@angular/core'.
src/app/app.module.ts(1,31): error TS2307: Cannot find module '@angular/core'.
src/app/app.module.ts(2,31): error TS2307: Cannot find module '@angular/platform-browser'.
src/main.ts(1,40): error TS2307: Cannot find module '@angular/platform-browser-dynamic'.
The second part of the error:
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular-quickstart@1.0.0 build: `tsc -p src/`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gia\AppData\Roaming\npm-cache\_logs\2017-06-12T15_05_48_144Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular-quickstart@1.0.0 prestart: `npm run build`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Here is the package.json file:
{
"name": "angular-quickstart",
"version": "1.0.0",
"description": "QuickStart package.json from the documentation, supplemented with testing support",
"scripts": {
"build": "tsc -p src/",
"build:watch": "tsc -p src/ -w",
"build:e2e": "tsc -p e2e/",
"serve": "lite-server -c=bs-config.json",
"serve:e2e": "lite-server -c=bs-config.e2e.json",
"prestart": "npm run build",
"start": "concurrently \"npm run tsc:w\" \"npm run serve\"",
"pree2e": "npm run build:e2e",
"e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run build",
"test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"",
"pretest:once": "npm run build",
"test:once": "karma start karma.conf.js --single-run",
"lint": "tslint ./src/**/*.ts -t verbose"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@angular/common": "~4.0.0",
"@angular/compiler": "~4.0.0",
"@angular/core": "~4.0.0",
"@angular/forms": "~4.0.0",
"@angular/http": "~4.0.0",
"@angular/platform-browser": "~4.0.0",
"@angular/platform-browser-dynamic": "~4.0.0",
"@angular/router": "~4.0.0",
"angular": "^1.6.4",
"angular-in-memory-web-api": "~0.3.0",
"core-js": "^2.4.1",
"node": "0.0.0",
"rxjs": "5.0.1",
"systemjs": "0.19.40",
"zone.js": "^0.8.4"
},
"devDependencies": {
"concurrently": "^3.2.0",
"lite-server": "^2.2.2",
"typescript": "~2.1.0",
"canonical-path": "0.0.2",
"tslint": "^3.15.1",
"lodash": "^4.16.4",
"jasmine-core": "~2.4.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~4.0.14",
"rimraf": "^2.5.4",
"@types/node": "^6.0.46",
"@types/jasmine": "2.5.36"
},
"repository": {}
}
via pooh098
No comments:
Post a Comment