2016-07-06 3 views
0

로컬로 배우려면 노드 JS를 랩톱에 설치했습니다. 윈도우 7 64 비트입니다.노드 JS NPM 오류

나는 괜찮 았던 설치 프로그램을 실행했습니다. 그러나, 내가 시도하고 아무것도 npm으로 할 때마다 나는 다음과 같은 오류가 발생합니다.

누구든지이 오류가 발생 했습니까? 제거를 시도하고 아무 쓸모가 없어졌습니다.

오류를 보면 Path 객체에서 무언가를 찾고있는 것 같습니다. (C : \ Users \ CHANGED_FOR_PRIVACY \ AppData \ Roaming \ npm \ node_modules \

실제로 그 디렉토리/경로에 아무 것도 없으므로 어딘가에 경로를 변경해야합니까? 이 예에서는 개인 정보 보호.

바람 까마귀 류 난 그냥 신선한 NPM을 설치 NPM과 Windows에서이 같은 문제로 실행했습니다

$ npm --version 
module.js:327 
    throw err; 
    ^

Error: Cannot find module 'strip-ansi' 
    at Function.Module._resolveFilename (module.js:325:15) 
    at Function.Module._load (module.js:276:25) 
    at Module.require (module.js:353:17) 
    at require (internal/module.js:12:17) 
    at Object.<anonymous> (C:\Users\CHANGED_FOR_PRIVACY\AppData\Roaming\npm\node_modules\npm\node_modules\npmlog\node_modules\gauge\node_modules\string-width\index.js:2:17) 
    at Module._compile (module.js:409:26) 
    at Object.Module._extensions..js (module.js:416:10) 
    at Module.load (module.js:343:32) 
    at Function.Module._load (module.js:300:12) 
    at Module.require (module.js:353:17) 
+0

'npm'을 업데이트 해 보셨습니까? 'npm install npm -g' – Quantastical

+0

실행시에도 동일한 오류가 발생합니다./ – Drongo

답변

3

. 당신은 노드의 설치없이 NPM을 설치 Cygwin에서와 컬을 사용할 수 있습니다.

다운로드 Cygwin

시작 Cygwin에서 터미널 관리자로 다음 명령

curl -L "https://npmjs.org/install.sh" | sh

이것은 신선한 NPM의 설치 할 것을 실행합니다. 다운로드하는 데 시간이 걸릴 수 있지만 모든 것이 성공적으로 완료되면 설치가 완료되면 마지막으로 인쇄 된 내용은 It Worked이됩니다.

그래야 문제가 해결됩니다.

+1

이것은 티켓 메이트였습니다. 도와 줘서 정말 고마워! – Drongo