【发布时间】:2013-04-27 17:49:40
【问题描述】:
我正在尝试制作一个npm包(插件)来通过node安装小JS框架,也想出了所需的package.json。
在 Mac 终端上运行 npm link 命令后,看到以下错误。
npm ERR! Error: EACCES, symlink '/Repos/GIT/JavaScript-Boilerplate'
npm ERR! { [Error: EACCES, symlink '/Repos/GIT/JavaScript-Boilerplate']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Repos/GIT/JavaScript-Boilerplate' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.3.0
npm ERR! command "node" "/usr/local/bin/npm" "link"
npm ERR! cwd /Repos/GIT/JavaScript-Boilerplate
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! path /Repos/GIT/JavaScript-Boilerplate
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '/Repos/GIT/JavaScript-Boilerplate'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Repos/GIT/JavaScript-Boilerplate/npm-debug.log
npm ERR! not ok code 0
附:我是 nodejs 的新手,但在 JavaScript 方面有丰富的经验,如果您需要更多详细信息,请告诉我。
编辑 - 解决了上面给出的问题,但现在遇到了更多问题,如下所示:
6495 verbose false,/Repos/GIT/JavaScript-Boilerplate/node_modules,/Repos/GIT/JavaScript-Boilerplate/node_modules/jquery/node_modules unbuild contextify@0.1.5
6496 info postuninstall contextify@0.1.5
6497 verbose about to build /Repos/GIT/JavaScript-Boilerplate/node_modules/jquery
6498 info /Repos/GIT/JavaScript-Boilerplate/node_modules/jquery unbuild
6499 verbose from cache /Repos/GIT/JavaScript-Boilerplate/node_modules/jquery/package.json
6500 info preuninstall jquery@1.8.3
6501 info uninstall jquery@1.8.3
6502 verbose true,/Repos/GIT/JavaScript-Boilerplate/node_modules,/Repos/GIT/JavaScript-Boilerplate/node_modules unbuild jquery@1.8.3
6503 info postuninstall jquery@1.8.3
6504 error contextify@0.1.5 install: `node-gyp rebuild`
6504 error `sh "-c" "node-gyp rebuild"` failed with 1
6505 error Failed at the contextify@0.1.5 install script.
6505 error This is most likely a problem with the contextify package,
6505 error not with npm itself.
6505 error Tell the author that this fails on your system:
6505 error node-gyp rebuild
6505 error You can get their info via:
6505 error npm owner ls contextify
6505 error There is likely additional logging output above.
6506 error System Darwin 12.3.0
6507 error command "node" "/usr/local/bin/npm" "link"
6508 error cwd /Repos/GIT/JavaScript-Boilerplate
6509 error node -v v0.10.4
6510 error npm -v 1.2.18
6511 error code ELIFECYCLE
6512 verbose exit [ 1, true ]
enter code here
enter code here
看起来我很接近它:)
【问题讨论】:
-
我已经修复了一些 package.json 值,现在它给了我以下问题:module.js:340 throw err; ^ 错误:Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Function 找不到模块'/Repos/GIT/JavaScript-Boilerplate/link' .Module.runMain (module.js:497:10) 在启动时 (node.js:119:16) 在 node.js:901:3