-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report]: can't install electron correctly #2099
Comments
我们看一下 |
pnpm 版本大更新了 , 默认阻止 “preinstall”、“install” 和 “postinstall” 预安装脚本的执行这绝对是 该作者最愚蠢的决定, 相信未来一定会引发无数多的问题 , 因为非常多的客户端使用的dev依赖 使用二进制进行分发, 并且安装时不会报错, 而是运行时报错, 这也意味着pnpm将彻底远离客户端的领域, 只能苟且于前端 |
无论如何 pnpm 这样做的确可以规避一些风险,也让用户可以精细化控制运行的 postscript,或许设计上他们应该使用黑名单模式而不是白名单模式,或者像 Arch Linux 在安装新的包之前或者在安装脚本更新之后每次询问?我并不是 pnpm 的开发者,这只是一些个人看法。 关于这个@wre232114 ,我们是否应该为 pnpm 更新我们的相关模板?我希望在 v2 之前重写我们的 create-farm 模块,现在正在进行这个工作,我可以在随后 PR 中一并处理它,新的模式中应该可以处理不同包管理器和不同模板之间的差异。 |
pnpm v10 blog pnpm 其实对于风险报告这件事的处理一直很头疼。尤其是之前发生的供应链攻击。这种方式并没有很好的解决方案。社区激进一点的说法是通过签名验证。 而pnpmv10选择阻止脚本, 这里有个解决方案 https://github.com/haoqunjiang/build-scripts-allowlist |
模板需要更新一下 |
Steps to reproduce
heme 5 : kali
[ Farm ] Using config file at C:\Users\superuse\super\vite\farm_electron\farm.config.ts
[ Farm ] Error: Failed to start the server
Caused by: Error: Failed to load farm config file: Electron failed to install correctly, please delete node_modules/electron and try installing again.
Potential solutions:
FARM_CONFIG_FORMAT=cjs
(default to esm)FARM_CONFIG_FULL_BUNDLE=1
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (C:\Users\superuse\super\vite\farm_electron\node_modules.pnpm\[email protected]\node_modules\electron\index.js:17:11)
at Object. (C:\Users\superuse\super\vite\farm_electron\node_modules.pnpm\[email protected]\node_modules\electron\index.js:21:18)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at cjsLoader (node:internal/modules/esm/translators:329:5)
at ModuleWrap. (node:internal/modules/esm/translators:260:7)
at loadConfigFile (file:///C:/Users/superuse/super/vite/farm_electron/node_modules/.pnpm/@[email protected]/node_modules/@farmfe/core/dist/config/index.js:621:15)
at async resolveConfig (file:///C:/Users/superuse/super/vite/farm_electron/node_modules/.pnpm/@[email protected]/node_modules/@farmfe/core/dist/config/index.js:65:34)
at async start (file:///C:/Users/superuse/super/vite/farm_electron/node_modules/.pnpm/@[email protected]/node_modules/@farmfe/core/dist/index.js:28:36)
at async handleAsyncOperationErrors (file:///C:/Users/superuse/super/vite/farm_electron/node_modules/.pnpm/@[email protected]/node_modules/@farmfe/cli/dist/utils.js:111:9)
ELIFECYCLE Command failed with exit code 1.
Reproduce link
No response
What is actually happening?
刚开始还可以启动 ,安装了一些依赖就报错了 ,提示没有正确安装electron, 卸载 nodes_module 之后重新安装依旧是这样
System Info
The text was updated successfully, but these errors were encountered: