无法使用源代码npm安装ramme

时间:2018-07-31 09:08:11

标签: node.js node-modules

我尝试了一个用于Instagram的非官方应用程序桌面,名为Ramme

我致电npm install时遵循了指示

> electron@2.0.2 postinstall /home/praz/igdm-master/node_modules/electron
> node install.js

/home/praz/igdm-master/node_modules/electron/install.js:47
  throw err
  ^

Error: EACCES: permission denied, mkdir '/home/praz/igdm-master/node_modules/electron/electron-tmp-download-4691-1533027792561'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@2.2.0 (node_modules/7zip-bin-win):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.2.0: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@1.0.1 (node_modules/7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@2.0.2 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@2.0.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/praz/.npm/_logs/2018-07-31T09_03_16_012Z-debug.log

我收到此错误日志。 我不知道如何在节点模块上获取电子?

对不起,我的英语不好。

3 个答案:

答案 0 :(得分:0)

对于Windows:使用admin命令提示符进行npm安装

对于Linux:使用sudo

如果上述方法不起作用,请尝试以下方法:

sudo npm install electron --unsafe-perm=true --allow-root

查看此issue on github

答案 1 :(得分:0)

尝试以这种方式运行

echo "yourRootPasswordHere" | npm install

您正以这种方式尝试运行您的节点模块安装过程,从而使安装过程能够读取root密码并执行root操作。您的进程失败,因为它无法执行mkdir命令

答案 2 :(得分:0)

代替发行,

npm install

您可以尝试执行以下命令吗?

npm install --unsafe-perm=true --allow-root

希望这会有所帮助!