一、
命令:报错信息:报错截图:解决方案:方案链接:
命令:
npm start
# 提示:这里的命令只能运行在有GUI图像渲染的机器上才有用,比如Ubuntu桌面版,我一开始运行在docker里,docker里只执行命令,所以是错误的。
报错信息:
npm WARN npm npm does not support Node.js v10.16.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
> @ start /mnt/hgfs/docker/AhMyth-Android-RAT/AhMyth-Server
> electron ./app
sh: 1: electron: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ start: `electron ./app`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
报错截图:
解决方案:
有可能是你的环境版本过高,先降低nodejs和npm版本,尝试不行再运行下面命令。
npm install electron -g
npm install
npm start
方案链接:Link
二、
命令:
npm install electron -g
sudo npm install electron -g
报错信息:
/usr/local/lib/node_modules/electron/install.js:49
throw err
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/electron/.electron'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@6.0.2 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@6.0.2 postinstall script.
报错截图:
解决方案:
sudo npm install -g electron --unsafe-perm=true --allow-root
方案链接:Link
三、
命令:
npm start
报错信息:
> @ start /home/ls/AhMyth-Server
> electron ./app
[17890:0814/112014.344180:FATAL:atom_main_delegate.cc(210)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180
报错截图:
解决方案:
exit #退出root用户权限即可
方案链接:无