2014-09-16 1 views
1

node.js 용 express로 실행하려고하는데 설치 단계에서 문제가 있습니다.express-generator를 전혀 설치할 수 없습니다 (노트북에서만 가능합니다, 데스크탑은 괜찮습니다)

노드를 잘 설치했으며 npm이 정상적으로 작동합니다.

기계 : 2011

맥북 에어에 윈도우 7이 처음 npm install -g express를 통해 Express를 설치하려고하지만 오류가 발생한 후 오류 만났다, 그래서 간단한 것 같아요 없습니다.

가 package.json :

{ 
    "name": "tutorial", 
    "description": "tutorial test app", 
    "version": "0.0.1", 
    "private": true, 
    "dependencies": { 
    "express": "4.x" 
    } 
} 

그때 npm install 마지막 표현 명중 것을 나는에 명시 설치를 원하는 디렉토리에 package.json 파일을 만들 급행 웹 사이트에 대한 몇 가지 조언을 따라, 그래서 내가 그랬어

,691 : (고궁 박물원 명령과 package.json이 자리 잡고 있었다) 디렉토리

지금 나는 단지 내가 전에 얻는 것과 같은 오류가 충족하고 그러나 Express Guide의 지침에 따라 npm install -g express-generator 시도에 설치

c:\code\node\tutorial>npm install -g express-generator 
C:\Users\JosephGoss\AppData\Roaming\npm\express -> C:\Users\JosephGoss\AppData\Roaming\npm\node_modules\express-generato 
r\bin\express 
npm ERR! peerinvalid The package flatiron does not satisfy its siblings' peerDependencies requirements! 
npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.1.9 
npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.1.9 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" 
"install" "-g" "express-generator" 
npm ERR! cwd c:\code\node\tutorial 
npm ERR! node -v v0.10.31 
npm ERR! npm -v 1.4.23 
npm ERR! code EPEERINVALID 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  c:\code\node\tutorial\npm-debug.log 
npm ERR! not ok code 0 

이 문제점을 해결 한 다른 빠른 설치 안내서를 검색하여 찾을 수 없습니다.

편집 : 방금 npm install -g expressnpm install -g express-generator을 데스크톱 컴퓨터 (i7의 Windows 7)에서 실행하려고 시도했지만 모든 것이 정상적으로 작동합니다.

내 노트북이 npm을 제대로 실행할 수없는 이유를 아는 사람이라면 누구나 맡을 것입니다.

답변

1

노드를 마지막으로 사용했을 때 몇 년 전에 설치 한 항목을 남겨 두었던 것 같습니다. 오래된 Jitsu 설치가 내 랩톱에서 내 문제를 일으키는 것 같았습니다.

c:\code\node\tutorial>npm uninstall -g jitsu 
unbuild [email protected] 

이제 모든 작품 :

here 내가 인감 도장을 제거하십시오.

0

시도가 명령하기 전에 sudo를 사용하는 예 :

npm install -g express-generator