我正在创建一个新的电子应用程序,现在我需要在其中安装电子打包程序。
node -v v10.16.0 & npm -v v6.9.0
(我都更新了)
我试着运行以下代码:
npm install electron-packager --save-dev还有这个:
npm install electron-packager -g错误:
npm ERR! code E404
npm ERR! 404 Not Found - GET http://registry.npmjs.org/electron-packager
npm ERR! 404
npm ERR! 404 'electron-packager@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.我能做什么?
谢谢!
发布于 2019-06-18 15:41:19
如果您指定操作系统,效果会更好。我曾经遇到过这个问题,将node降级到v8.0解决了这个问题。
但我强烈建议您使用电子生成器(https://github.com/electron-userland/electron-builder)而不是电子打包程序来创建安装程序包,因为它具有更多的选项,包括内置的自动更新功能,因此要容易得多。
https://stackoverflow.com/questions/56643004
复制相似问题