electron 打包好的应用找不到xml2json

但是开发环境npm start 运行正常

定位

node_modules没有包含在打的包中,

解决办法

--no-prune

Be careful not to include node_modules you don't want into your final app. If you put them in the devDependencies section of package.json, by default none of the modules related to those dependencies will be copied in the app bundles. (This behavior can be turned off with the --no-prune flag.) In addition, folders like .git and node_modules/.bin will be ignored by default. You can use --ignore to ignore files and folders via a regular expression (not a glob pattern). Examples include --ignore=.gitignore or --ignore=".git(ignore|modules)".

electron-packager ./ --platform linux --arch=x64 --overwrite --no-prune

相关文章:

  • 2022-12-23
  • 2021-05-06
  • 2021-06-27
  • 2022-12-23
  • 2021-11-26
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-02-10
  • 2021-10-17
  • 2021-04-15
  • 2021-12-18
相关资源
相似解决方案