我正在尝试在我的 mac 中安装节点..
我收到以下错误...
我从节点站点下载了节点并运行了该包...
你们能告诉我为什么我会遇到这个错误..当我执行 npm install 时
MacBook-Pro:~ Raj$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/Users/Raj/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/Raj
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /Users/Raj/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Raj/npm-debug.log
npm ERR! not ok code 0
仅运行“npm install”将查找 package.json 中列出的依赖项。您收到的错误表明您没有设置 package.json 文件(或者您位于错误的目录中)。
如果您尝试安装特定包,则应使用“npm install {package name}”。看here https://www.npmjs.org/doc/cli/npm-install.html有关该命令的更多信息。
否则,您需要创建一个包.json https://www.npmjs.org/doc/json.html文件的依赖项或转到正确的目录,然后运行“npm install”。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)