2013-11-20 2 views
7

내 Mac에 Titanium을 설치했는데 이제는 npm 패키지를 전역 적으로 설치하려고 시도 할 때 실패합니다. 그때 이후, 아무 것도 반환되지 않은 꿀꿀 - 초기화 할 때 내 설치에서티탄 설치 후 NPM 설치 -g가 작동하지 않음

출력은

npm http 304 https://registry.npmjs.org/loggly 
npm http GET https://registry.npmjs.org/underscore 
npm http GET https://registry.npmjs.org/timespan 
npm http GET https://registry.npmjs.org/request 
npm http 304 https://registry.npmjs.org/underscore 
npm http 304 https://registry.npmjs.org/request 
npm http 304 https://registry.npmjs.org/timespan 
/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/bin/grunt-init -> /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib/node_modules/grunt-init/bin/grunt-init 
[email protected] /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib/node_modules/grunt-init 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected]) 

입니다. 티타늄의 일부인 뭔가가 내 -g npm 설치를 방해하고있는 것 같습니다.

이것은 티타늄을 설치 한 이후로만 시작되었습니다. 수동으로 grunt-init을 npm 디렉토리에 설치하면 작동하도록 할 수 있습니다. 그러나 이것은 필자에게 가장 좋은 기능을 제거했습니다.

도와주세요!

+0

npm을 제거한 후 다시 설치했지만 여전히 문제가 발생했습니다. npm 로그를보고 오류 : EACCES, mkdir '/ 응용 프로그램/티타늄 스튜디오/TitaniumStudio.app/내용/MacOS/암호 :/usr/local/share/npm/lib' 4 오류 {[오류 : EACCES, 4 오류 errno : 3, 4 오류 코드 : 'EACCES', 오류 경로 4 개 오류 경로 :/e/: '/ Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password :/usr/local/share/npm/lib'} 오류이 명령을 root/Administrator로 다시 실행하십시오. – user3011849

+0

아직 남아 있습니다>!? – user3011849

+0

고정 노드와 npm을 완전히 제거한 다음 nvm을 사용하여 다시 설치하십시오. 과거에 일부 사용 권한 문제가 발생하여 티타늄 이후의 모든 설치가 망가 졌던 것 같습니다. 조언의 말씀 nvm이 앞으로 나아갈 것 같습니다! – user3011849

답변

20

시도 입력 :

npm set prefix /usr/local 

그런 다음 다시 설치.

+0

생명의 은인, 고마워요! –

+0

제 경우에는''npm set prefix/usr/local/share/npm''을 사용하여 잘 작동했습니다 – RickyCheers