2017-10-26 1 views
1

저는 각도를 배우려고 노력 중이며 책을 구입했습니다. 예제 코드는 실행되지 않습니다. Angular quickstart 프로젝트를 실행 중이지만이 작업은 수행하지 않습니다. 어쩌면 어떤 사람이 도울 수 있습니다.각도, 샘플 프로젝트를 실행할 수 없습니다.

이것은 npm start을 실행할 때 내가 오류 메시지가 인도 표준시 :

npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 
npm ERR! node v6.11.5 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" ` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" '. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the blog-app package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs blog-app 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls blog-app 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  E:\angular\kickstart\blog-start\npm-debug.log 

을 그리고 이것은 내 package.json입니다 : 내가 시작 스크립트 변경과 같은 (유래 게시물에서 몇 가지 솔루션을 시도

{ 
    "name": "blog-app", 
    "version": "1.0.0", 
    "description": "Blog Applikation", 
    "watch": { 
    "copy:html": "./app/**/*.html" 
    }, 
    "scripts": { 
    "start": "tsc && npm run copy:html && concurrently \"npm run tsc:w\" \"npm run html:watch\" \"live-server\" ", 
    "tsc": "./node_modules/.bin/tsc", 
    "tsc:w": "./node_modules/.bin/tsc --watch", 
    "copy:html": "copyfiles -u 1 ./app/**/*.html dist", 
    "html:watch": "onchange \"./app/**/*.html\" -v -- npm run copy:html" 
    }, 
    "keywords": [], 
    "author": "", 
    "license": "ISC", 
    "dependencies": { 
    "@angular/common": ">=4.0.0-beta <5.0.0", 
    "@angular/compiler": ">=4.0.0-beta <5.0.0", 
    "@angular/core": ">=4.0.0-beta <5.0.0", 
    "@angular/forms": ">=4.0.0-beta <5.0.0", 
    "@angular/http": ">=4.0.0-beta <5.0.0", 
    "@angular/platform-browser": ">=4.0.0-beta <5.0.0", 
    "@angular/platform-browser-dynamic": ">=4.0.0-beta <5.0.0", 
    "systemjs": "0.19.27", 
    "core-js": "^2.4.1", 
    "reflect-metadata": "^0.1.3", 
    "rxjs": "5.1.0", 
    "zone.js": "^0.8.4", 
    "bootstrap": "^3.3.6" 
    }, 
    "devDependencies": { 
    "canonical-path": "0.0.2", 
    "concurrently": "^2.2.0", 
    "copyfiles": "^1.0.0", 
    "http-server": "^0.9.0", 
    "live-server": "^1.1.0", 
    "lodash": "^4.11.1", 
    "npm-watch": "^0.1.6", 
    "onchange": "^3.0.2", 
    "rimraf": "^2.5.2", 
    "tslint": "^3.7.4", 
    "typescript": "^2.0.2", 
    "typings": "^1.0.4" 
    }, 
    "repository": {} 
} 

하지만 도움이되지 않았다.)

EDIT : NPM을 업데이트하려고 시도했지만 도움이되지 않았습니다.

,451,515,
PS E:\angular\kickstart\blog-start> npm start 

> [email protected] start E:\angular\kickstart\blog-start 
> tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" 

node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class 'Subject<T>' incorrectly extends base class 'Observable<T>'. 
    Types of property 'lift' are incompatible. 
    Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'. 
     Type 'Observable<T>' is not assignable to type 'Observable<R>'. 
     Type 'T' is not assignable to type 'R'. 
npm ERR! code ELIFECYCLE 
npm ERR! errno 2 
npm ERR! [email protected] start: `tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" ` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] start 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\XYZ\AppData\Roaming\npm-cache\_logs\2017-10-26T10_14_42_254Z-debug.log 

로그 파일 :

Node JS
NPM :

0 info it worked if it ends with ok 
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 
1 verbose cli 'C:\\Users\\XYZ\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 
1 verbose cli 'start' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
5 info lifecycle [email protected]~prestart: [email protected] 
6 info lifecycle [email protected]~start: [email protected] 
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
8 verbose lifecycle [email protected]~start: PATH: C:\Users\XYZ\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;E:\angular\kickstart\blog-start\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\;C:\MinGW\bin;C:\Program Files\nodejs\;C:\Users\XYZ\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\XYZ\AppData\Local\Programs\Python\Python36-32\;C:\Users\XYZ\AppData\Local\Programs\Python\Launcher\;C:\Users\XYZ\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files (x86)\CMake\bin;C:\Users\XYZ\AppData\Roaming\npm 
9 verbose lifecycle [email protected]~start: CWD: E:\angular\kickstart\blog-start 
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 
10 silly lifecycle 'tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" ' ] 
11 silly lifecycle [email protected]~start: Returned: code: 2 signal: null 
12 info lifecycle [email protected]~start: Failed to exec start script 
13 verbose stack Error: [email protected] start: `tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" ` 
13 verbose stack Exit status 2 
13 verbose stack  at EventEmitter.<anonymous> (C:\Users\XYZ\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16) 
13 verbose stack  at emitTwo (events.js:106:13) 
13 verbose stack  at EventEmitter.emit (events.js:191:7) 
13 verbose stack  at ChildProcess.<anonymous> (C:\Users\XYZ\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 
13 verbose stack  at emitTwo (events.js:106:13) 
13 verbose stack  at ChildProcess.emit (events.js:191:7) 
13 verbose stack  at maybeClose (internal/child_process.js:920:16) 
13 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 
14 verbose pkgid [email protected] 
15 verbose cwd E:\angular\kickstart\blog-start 
16 verbose Windows_NT 10.0.14393 
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\XYZ\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start" 
18 verbose node v6.11.5 
19 verbose npm v5.5.1 
20 error code ELIFECYCLE 
21 error errno 2 
22 error [email protected] start: `tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" ` 
22 error Exit status 2 
23 error Failed at the [email protected] start script. 
23 error This is probably not a problem with npm. There is likely additional logging output above. 
24 verbose exit [ 2, true ] 
+0

위의 명령으로 현재 프로젝트 만 각도 CLI를 설치하려고 할 수 있습니다 -> NPM ERR! [email protected] 시작 스크립트 'tsc && npm에서 복사 실패 : html && 동시 실행 "npm run tsc : w" "npm run html : watch" "live-server". npm ERR! node.js와 npm의 최신 버전이 설치되어 있는지 확인하십시오. npm ERR! 그렇게한다면 블로그 앱 패키지 에 문제가있을 가능성이 높습니다. 노드 버전을 업데이트하고 npm을 실행하여 – mtamma

+0

을 모두 업데이트하십시오 (어제 node.js를이 컴퓨터에 처음 설치했습니다). NDR 설치를 시도하고 npm을 시작합니다. 새로운 오류에 대해서는 post를 참조하십시오. : – DoubleVoid

답변

1

당신은 Node.js를하고 NPM의 최신 버전을 설치해야 뭔가를 가지고 같은 npm install [email protected] -g

+0

노드 v6.11.5는 docs에 따라 잘되어야합니다 : https://angular.io/guide/quickstart#devenv –

+0

npm을 업데이트하려고했지만 도움이되지 않았습니다. 첫 번째 게시물에 출력을 추가했습니다. – DoubleVoid

0

같습니다 각도 CLI (npm ERR! 패키지에서 볼 수없는 argv "C : ₩ Program Files ₩ nodejs ₩ node.exe" "C : ₩ Program Files ₩ nodejs ₩ node_modules ₩ npm ₩ bin ₩ npm-cli.js" "start") > NPM 각 프로젝트를 설치 각도/CLI @ 설치 - -> 새 겨 당신의 프로젝트 이름

당신에게 나의 제안은 이 각도 CLI를 설치 몇 가지 새로운 폴더를 생성 각도 CLI 와 새로운 깨끗한 프로젝트를 만드는 것입니다 파일

당신은 항상 최신 버전으로 NodeJS를 업데이트하거나 로그를 볼 수

+0

Angular에 완전히 익숙하다 .npm install @ angular/cli'을 시도했다. 그리고 나서, 새로운 testproject가 작동하지 않는다. 문제는, 튜토리얼 예제를 따라하고 싶다. node_modules 폴더가있다. 프로젝트 폴더에서 npm이'program files'에서 검색하는 것이 좋은 질문 인 이유는 무엇입니까? – DoubleVoid

관련 문제