これはノード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