我正在尝试通过教程学习 mean.js。
我已经安装了 node.js、npm、mongodb、grunt、bower、gulp 和 yeoman,没有任何错误。
当我尝试在终端(在 Mac OS 上)中“yo meanjs”时,我输入了我想要安装的目录并回答了几个问题。我不断收到此消息: 错误:命令失败:/bin/sh -c cd users/danzeller/mean/vteer && npm install npm WARN deprecated phantomjs@2.1.7:包重命名为 phantomjs-prebuilt。请将“phantomjs”包引用更新为“phantomjs-prebuilt”
我根据他们的网站安装了 phantomjs-prebuilt 没有错误。
我不确定如何按照错误消息所示“更新引用”。
这是完整的终端错误:
Running npm install for you....
This may take a couple minutes.
Error: Command failed: /bin/sh -c cd users/danzeller/mean/vteer && npm install
npm WARN deprecated phantomjs@2.1.7: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt'
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.0
npm ERR! npm v3.8.1
npm ERR! path /var/root/.npm/connect-mongo
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/var/root/.npm/connect-mongo'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/var/root/.npm/connect-mongo']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/var/root/.npm/connect-mongo',
npm ERR! parent: 'volunteer' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /private/var/root/users/danzeller/mean/vteer/npm-debug.log
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:475:12)
似乎想将安装放在/private/var/root/文件夹中,但是我想放在/users/danzeller/mean/文件夹中。
我正在使用
sudo su -
在终端窗口中安装这个 ---- 这不正确吗?这是否指向错误的文件夹?
任何帮助都会很棒,因为我是新手。
谢谢! 丹
最佳答案
我认为,包所有者负责执行此操作。
关于node.js - 如何将 'phantomjs' 包引用更新为 'phantomjs-prebuilt' - 来自 Mac OS 终端的消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36502773/