• electron package can not find module xml2json


    问题

    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

  • 相关阅读:
    JavaScript运行机制 Event Loop
    async 函数
    JavaScript Promise 对象
    pc端rest.css
    微信小程序公用样式类
    移动端base.css
    RegExp正则对象匹配规则
    RegExp正则相关方法
    mysql(五)事务
    mysql(四)海量数据优化
  • 原文地址:https://www.cnblogs.com/mayidudu/p/5865267.html
Copyright © 2020-2023  润新知