按照官方文档执行到这一步
npx electron-forge import

✔ Checking your system
✔ Initializing Git Repository
✔ Writing modified package.json file
✖ Installing dependenciesAn unhandled error has occurred inside Forge:
Failed to install modules: ["electron-squirrel-starWith output: Command failed with a non-zero return
npm install electron-squirrel-startup --savenpm WARN ERESOLVE overriding peer dependency
npm WARN Found: typescript@4.2.3
npm WARN node_modules/tslint-xo/node_modules/typesc
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@"^2.2.0 || ^3.0.0" from ts
npm WARN node_modules/tslint-xo/node_modules/tslint
npm WARN   tslint-eslint-rules@"^5.4.0" from tslint
npm WARN   node_modules/tslint-xo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: typescript@4.2.3
npm WARN node_modules/tslint-xo/node_modules/typesc
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@"^2.1.0 || ^3.0.0" from ts
npm WARN node_modules/tslint-xo/node_modules/tslint
npm WARN   tslint-microsoft-contrib@"^5.2.1" from t
npm WARN   node_modules/tslint-xo
npm WARN deprecated multiline@2.0.0: This was a fun
literals, so use that instead.
npm WARN deprecated request-promise-native@1.0.9: reprecated because it extends the now deprecated req.com/request/request/issues/3142
npm WARN deprecated minimatch@2.0.10: Please update avoid a RegExp DoS issue
npm WARN deprecated left-pad@1.3.0: use String.prot
npm WARN deprecated fsevents@1.2.13: fsevents 1 wile using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated node-pre-gyp@0.15.0: Please upg: the non-scoped 'node-pre-gyp' package is deprecatackage will recieve updates in the future
npm WARN deprecated core-js@2.6.12: core-js@<3 is nmmended for usage due to the number of issues. Plea the actual version of core-js@3.
npm WARN deprecated core-js@2.6.12: core-js@<3 is nmmended for usage due to the number of issues. Plea the actual version of core-js@3.
npm WARN deprecated core-js@2.6.12: core-js@<3 is nmmended for usage due to the number of issues. Plea the actual version of core-js@3.
npm ERR! code ENOENT
npm ERR! syscall symlink
npm ERR! path D:\Front_end\技术栈demoes\echarts-demver
npm ERR! dest D:\Front_end\技术栈demoes\echarts-demylus\node_modules\semver
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, es\echarts-demo\node_modules\_semver@6.3.0@semver' harts-demo\node_modules\_stylus@0.54.8@stylus\node_
npm ERR! enoent This is related to npm not being ab
npm ERR! enoent

参考这篇文章修改了npx镜像源,无效。
https://segmentfault.com/q/1010000021786171
明明已经使用cnpm install electron-squirrel-startup --save安装了依赖,但是还是报错,似乎一定要使用npm的亚子,这里没有搞懂。。。

npm install electron-squirrel-startup --save --no-bin-links仍无法建立文件链接,此时window的文件链接功能应该是打开了的。

npm WARN ERESOLVE overriding peer dependency
npm WARN Found: typescript@4.2.3
npm WARN node_modules/tslint-xo/node_modules/typescript
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@"^2.2.0 || ^3.0.0" from tslint-eslint-rules@5.4.0
npm WARN node_modules/tslint-xo/node_modules/tslint-eslint-rules
npm WARN   tslint-eslint-rules@"^5.4.0" from tslint-xo@0.10.0
npm WARN   node_modules/tslint-xo
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: typescript@4.2.3
npm WARN node_modules/tslint-xo/node_modules/typescript
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@"^2.1.0 || ^3.0.0" from tslint-microsoft-contrib@5.2.1npm WARN node_modules/tslint-xo/node_modules/tslint-microsoft-contrib
npm WARN   tslint-microsoft-contrib@"^5.2.1" from tslint-xo@0.10.0
npm WARN   node_modules/tslint-xo
npm WARN deprecated multiline@2.0.0: This was a fun hack, but now we have template literals, so use that instead.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated node-pre-gyp@0.15.0: Please upgrade to @mapbox/node-pre-gyp@1.x: the non-scoped 'node-pre-gyp' package is deprecated and only the @mapbox
scoped package will recieve updates in the future
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not
recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not
recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not
recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code ENOENT
npm ERR! syscall symlink
npm ERR! path D:\Front_end\技术栈demoes\echarts-demo\node_modules\_mkdirp@0.5.5@mkdirp
npm ERR! dest D:\Front_end\技术栈demoes\echarts-demo\node_modules\_stylus@0.54.5@stylus\node_modules\mkdirp
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, symlink 'D:\Front_end\技术栈
demoes\echarts-demo\node_modules\_mkdirp@0.5.5@mkdirp' -> 'D:\Front_end\技术栈demoes\echarts-demo\node_modules\_stylus@0.54.5@stylus\node_modules\mkdirp'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

关键在于:no such file or directory, symlink。然而两个目录都存在,晕~~
猜测是中文引起的目录查询不到,遂将目录改成英文,问题解决。然而又迎来新的报错(吐血):

npm ERR! code 1
npm ERR! path D:\Front_end\Techdemoes\echarts-demo\node_modules\@electron-forge\shared-types\node_modules\lzma-native
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build && rimraf build
npm ERR! [lzma-native] Success: "D:\Front_end\Techdemoes\echarts-demo\node_modules\@electron-forge\shared-types\node_modules\lzma-native\binding-v6.0.1-n-api-win32-x64\lzma_native.node" is installed via remote
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.17.0
npm ERR! node-pre-gyp info using node@14.16.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "D:\Front_end\Techdemoes\echarts-demo\node_modules\@electron-forge\shared-types\node_modules\lzma-native\binding-v6.0.1-n-api-win32-x64\lzma_native.node" (not found)
npm ERR! node-pre-gyp http GET https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-win32-x64.tar.gz
npm ERR! node-pre-gyp http 200 https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-win32-x64.tar.gz
npm ERR! node-pre-gyp info install unpacking binding-v6.0.1-n-api-win32-x64/liblzma.dll
npm ERR! node-pre-gyp info install unpacking binding-v6.0.1-n-api-win32-x64/lzma_native.node
npm ERR! node-pre-gyp info tarball done parsing tarball
npm ERR! node-pre-gyp info ok
npm ERR! 'rimraf' �����ڲ����ⲿ���Ҳ���ǿ����еij���
npm ERR! ���������ļ���

状态码200,可以下载。但是在’rimraf’+奇怪的乱码 上出了问题。度娘一下:

rimraf 包的作用:以包的形式包装rm -rf命令,用来删除文件和文件夹的,不管文件夹是否为空,都可删除.

尝试npm安装rimraf,果然安装报错。改用cnpm安装,完成。再重新执行npm install electron-squirrel-startup --save --no-bin-links
依然报同样的错。明天再写,希望有大佬能解答疑惑。

electron打包错误相关推荐

  1. electron builder 打包错误 cannot unpack electron zip file 解决方案

    electron builder 打包错误 cannot unpack electron zip file 解决方案 参考文章: (1)electron builder 打包错误 cannot unp ...

  2. Electron Vue 打包错误: InvalidConfigurationError: ‘build‘ in the application package.json

    Electron Vue electron-builder 打包错误: InvalidConfigurationError: 'build' in the application package.js ...

  3. electron打包可选择安装位置,可自动更新

    Electron打包调参软件(windows版) ----------------------------------可选安装位置,可自动更新,手动更新 一:引包:electron,electron- ...

  4. electron打包vue-cli4项目的解决方案1(项目实测)

    背景: 项目已通过vue-cli4框架开发并运行在nginx服务器上(使用了nginx的反向代理),现需要将该项目转成桌面端应用程序,选择electron来实现. 设想2种解决方案: 1.使用elec ...

  5. Electron打包(windows平台)

    文章目录 一.设置npm环境(为了解决打包时下载某些依赖包慢.下载不了的问题): 二.使用electron-packager打包: 1.安装electron-packager 2.快速打包命令: 3. ...

  6. electron打包web项目之stackedit实战——反面教材

    很抱歉,误导大家了.electron只支持客户端web项目,package.json里的scripts字段太误导人了.让我傻傻地以为真的可以在里面写一个 node server.js呢.辛亏我照着自己 ...

  7. electron打包现成的vue项目成.exe文件,build打包vue项目(quasar 框架)

    前言: 公司已有web端vue项目,现在有需求,需要把web端的该项目用electron打包成 .exe 可执行文件. 思考:打包成 .exe 文件,首先需要将vue项目在本地打包成静态可运行文件,其 ...

  8. Java---报错The type List is not generic; it cannot be parameterized with arguments <Role>==List打包错误

    提示The type List is not generic; it cannot be parameterized with arguments 错误. 翻译:类型列表不是泛型:不能用参数参数化它 ...

  9. Electron 打包Mac安装包代码签名问题解决方案Could not get code signature for running application

    Electron 打包Mac安装包代码签名问题解决方案Could not get code signature for running application 参考文章: (1)Electron 打包 ...

最新文章

  1. Openxml: 导出excel 设置 cell的格式
  2. jQuery经典面试题及答案精选[转]
  3. 2019 年百度之星·程序设计大赛 - 初赛一
  4. Extjs 中的cookie设置
  5. 前端学习(2847):css鼠标样式
  6. uestc oj 1218 Pick The Sticks (01背包变形)
  7. impala java api 操作_Impala实践之六:使用Rest Api
  8. MySQL服务 - 客户端工具mysql及mysqladmin使用介绍
  9. 计算机应用基础考试excel操作题,计算机应用基础上机操作试题
  10. 性能监视器 Performance Monitor-对SQLSERVER进行性能监控
  11. 2022年广东省安全员A证第三批(主要负责人)考试试题及答案
  12. 计算机基础ppt说课稿,计算机基础说课稿ppt课件
  13. windows下jenkins批处理执行git pull失败的原因
  14. 如何用手机制作gif表情包图片?简单几步生成GIF动态图
  15. 推荐几个比较好的软件测试博客论坛
  16. 微信小程序位置授权被取消再授权
  17. 更改chm文件的字体大小
  18. 传输层安全---SSL
  19. 【威胁通告】攻击者利用漏洞攻击Edimax WiFi桥接器
  20. 动态内存的申请和非动态内存的申请_非深户父母买社保就加分!深圳罗湖学位申请规则将调整!快算算你多少分...

热门文章

  1. 快消品企业数字化转型解决方案
  2. 手机品牌,型号,分辨率,系统,版本号
  3. 第六章 3D地形搭建(上)
  4. 金融行业需要什么样的数据库?
  5. SIKI学院:MySQL数据库从零到精通:三:课时 4 : 03-服务器端运行通信原理图+课时 5 : 04-游戏服务器端简介
  6. 如何个性化U盘或硬盘图标
  7. 公司域名到期时间查询
  8. hdu-5009-Paint Pearls-dp
  9. 基于R语言股票市场收益的统计可视化分析
  10. C++实现一个简单的计算器