이것은 노드 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에서도 작동합니다.
노드를 v7.4.0으로 업데이트하고 npm을 4.1.1로 업데이트했습니다. '@ type/node'는 npm 레지스트리에 없습니다. – KATHERINE