我正在尝试在OSX上使用Node.js安装Gulp,但出了点问题。这就是我的所作所为。
sudo npm init
创建package.json
文件sudo npm install —save-dev gulp
此时出现了错误。
npm WARN package.json dependencies@1.0.0 No description
npm WARN package.json dependencies@1.0.0 No repository field.
npm WARN package.json dependencies@1.0.0 No README data
npm ERR! addLocal Could not install /Users/dorinocanciani/Sites/prova/resources/dependencies/—save-dev
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "—save-dev" "gulp"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /Users/dorinocanciani/Sites/prova/resources/dependencies/—save-dev
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent ENOENT, open '/Users/dorinocanciani/Sites/prova/resources/dependencies/—save-dev'
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/dorinocanciani/Sites/prova/resources/dependencies/npm-debug.log
我在谷歌搜索了很多但没有这种错误的结果。 你能帮我修一下这个错误吗?
答案 0 :(得分:1)
您在命令中错过了-
:npm install --save-dev gulp
更新:您似乎根本没有使用-
,但—
这是另一个角色并且错了。