2017-01-22 1 views
1

sudo npm install -g protractor를 실행하면 오류가 발생하여 해당 폴더/파일이없는 것처럼 보입니다. 문제를 해결하는 방법을 아는 사람이 있습니까? 정말 감사합니다 :) 같은 문제에mac sudo npm install -g protractor 오류 404

npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "protractor" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! code E404 

npm ERR! 404 no such package available : @types/node 
npm ERR! 404 
npm ERR! 404 '@types/node' is not in the 
npm registry. 
npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 It was specified as a dependency of 'protractor' 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, http url, or git url. 

npm ERR! Please include the following file with any support request: 

npm install screenshot

+0

노드를 v7.4.0으로 업데이트하고 npm을 4.1.1로 업데이트했습니다. '@ type/node'는 npm 레지스트리에 없습니다. – KATHERINE

답변

0

어떤 사람들은 4.0.4로 버전을 감소 도움이 것을 발견했다. Buts는 자주 오류로 보입니다. 아직 멋진 해결책은 아니지만 일부는 효과가있는 것으로 보입니다.

+0

다른 방법으로 알아낼 수 있습니까? 감사합니다 :) – KATHERINE

1

이것은 노드 6.9.2에서 재현 가능합니다. 노드의이 버전에 대한 npm의 오류라고 생각합니다.

❯ nvm install 6.9.2                                 ⏎ 
Downloading https://nodejs.org/dist/v6.9.2/node-v6.9.2-darwin-x64.tar.xz... 
######################################################################## 100.0% 
WARNING: checksums are currently disabled for node.js v4.0 and later 
Now using node v6.9.2 (npm v3.10.9) 

❯ npm i - g @types/node 
npm ERR! addLocal Could not install /Users/cnishina/- 
npm ERR! Darwin 16.3.0 
npm ERR! argv "/Users/cnishina/.nvm/versions/node/v6.9.2/bin/node" "/Users/cnishina/.nvm/versions/node/v6.9.2/bin/npm" "i" "-" "g" "@types/node" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! path /Users/cnishina/- 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open '/Users/cnishina/-' 
npm ERR! enoent ENOENT: no such file or directory, open '/Users/cnishina/-' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/cnishina/npm-debug.log 

은 6.9.3을 설치 한 후 오류가 사라집니다 :

❯ nvm install 6.9.3 
Downloading https://nodejs.org/dist/v6.9.3/node-v6.9.3-darwin-x64.tar.xz... 
######################################################################## 100.0% 
WARNING: checksums are currently disabled for node.js v4.0 and later 
npm i -g @tNow using node v6.9.3 (npm v3.10.10) 


❯ npm i -g @types/node 
/Users/cnishina/.nvm/versions/node/v6.9.3/lib 
└── @types/[email protected] 

나는 또한이 게시물의 당시 최신 노드 (6)를 설치하는 것이 좋습니다, 그것은 노드 6.9.4입니다. @types/node 설치를 점검 한 결과 노드 6.9.4에서도 작동합니다.

+0

감사. 하지만 시도 npm하지만 같은 오류가 발생했습니다 : ( – KATHERINE

+0

당신은 npm 캐싱 레이어를 사용하고 있습니까? artifactory 또는 넥서스처럼? – cnishina

+0

아니, 나는 맥에서 npm을 사용하고 있습니다 – KATHERINE

관련 문제