收藏
回答

Kbone使用Vue模板安装依赖后编译和打包小程序端错误?

https://github.com/wechat-miniprogram/kbone-template-vue

执行命令:npm run build:mp 或 npm run mp

回答关注问题邀请回答
收藏

4 个回答

  • 小程序技术专员-june
    小程序技术专员-june
    置顶回答2020-02-25

    非常抱歉哈, mp-webpack-plugin 在 0.8.1 版本在处理 projectConfig 参数时缺少判断,现已修复到 0.8.2 版本。

    2020-02-25
    有用
    回复 1
    • 拾忆
      拾忆
      2020-02-25
      收到
      2020-02-25
      回复
  • 小程序技术专员-binnie
    小程序技术专员-binnie
    2020-02-25

    看下配置是不是to参数没有传呢

    2020-02-25
    有用 1
    回复 4
    • 陈式坚
      陈式坚
      2020-02-25
      你赶紧修复一下,0.8.1版本


      src/index.js 335行这句有问题


      generateConfig.projectConfig默认是 undefined,自然跑不通。所以就挂了。
      2020-02-25
      1
      回复
    • 小程序技术专员-june
      小程序技术专员-june
      2020-02-25回复陈式坚
      是的。。。现在已发布 0.8.2 版本修复此问题。
      2020-02-25
      1
      回复
    • 小程序技术专员-binnie
      小程序技术专员-binnie
      2020-02-25回复陈式坚
      修复到0.8.2了,感谢
      2020-02-25
      1
      回复
    • 陈式坚
      陈式坚
      2020-02-25回复小程序技术专员-binnie
      辛苦了
      2020-02-25
      回复
  • 陈式坚
    陈式坚
    2020-02-25

    记得好像是因为mp-webpack-plugin版本造成

    0.8.1的版本作者不计后果的加了一个 projectConfig 自定义路径

    解决办法

    1. 退回0.8.0版本
    npm i mp-webpack-plugin@0.8.0 -D
    


    2.在 mp.config.js 里

    {
        generate: {
            projectConfig: '', 
        },
        // 其他配置...
    }
    
    2020-02-25
    有用 3
    回复 1
    • 拾忆
      拾忆
      2020-02-25
      试了下,还真是这个问题
      2020-02-25
      回复
  • 怀瑾握瑜
    怀瑾握瑜
    2020-02-25

    我也遇到这个问题,node.js版本是v12.16.1,具体错误信息:


     UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
    (node:1812) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    


    我尝试在package.json中增加 --hide-modules  --unhandled-rejections=strict 也是不通过







    2020-02-25
    有用
    回复
登录 后发表内容
问题标签