在electronic@1.8.2安装后脚本失败 [英] Failed at the electron@1.8.2 postinstall script

查看:209
本文介绍了在electronic@1.8.2安装后脚本失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将电子安装到我的项目中,但是它给出了一个错误.我还尝试使用unsafe-perm进行此操作,但仍然给出相同的错误.

I was trying to install electron into my project, but it is giving an error. I also tried to do this with unsafe-perm, but still giving the same error.

npm install electron --save-dev --save-exact

> electron@1.8.2 postinstall E:\PrgLang\Electron\crypto-app\node_modules\electron
> node install.js

Downloading electron-v1.8.2-win32-x64.zip
[============================================>] 100.0% of 55.21 MB (1.51 MB/s)
E:\PrgLang\Electron\crypto-app\node_modules\electron\install.js:47
throw err
^

Error: Could not parse checksum file at line 1:
at new ChecksumParseError (E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:71:127)
at E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:130:20
at Array.forEach (<anonymous>)
at E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:125:38
at new Promise (<anonymous>)
at ChecksumValidator.parseChecksumFile (E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:121:14)
at <anonymous>
npm WARN crypto-app@1.0.0 No description
npm WARN crypto-app@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.8.2 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.8.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!     C:\Users\Harshit\AppData\Roaming\npm-cache\_logs\2018-02-11T03_33_52_399Z-debug.log

推荐答案

能否请您尝试一下(在删除node_modules之后)

Can you please try(after removing node_modules)

sudo npm install electronic --save-dev --save-exact --unsafe-perm = true --allow-root

我遇到了同样的错误,这对我有用.

I was running into the same error and this is what worked for me.

这篇关于在electronic@1.8.2安装后脚本失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆