weex-ui 使用报错Module build failed: Error: Plugin/Preset files are not allowed to export objects, on...

npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.
npm WARN babel-loader@6.4.1 requires a peer of babel-core@^6.0.0 but none was installed.
npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.

  • weex-ui@0.6.7
    updated 1 package in 15.489s
    lm-majinlideMacBook-Air:demo zhoucanweex-ui@0.6.7 bash: weex-ui@0.6.7: command not found lm-majinlideMacBook-Air:demo zhoucan npm i babel-preset-stage-0 babel-plugin-component -D
    npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none was installed.
    npm WARN babel-loader@6.4.1 requires a peer of babel-core@^6.0.0 but none was installed.
    npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.
    npm WARN babel-loader@6.4.1 requires a peer of babel-core@^6.0.0 but none was installed.
    npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.

  • babel-preset-stage-0@6.24.1

  • babel-plugin-component@1.1.1
    updated 2 packages in 19.887s
    lm-majinlideMacBook-Air:demo zhoucan$

原因:
babel 6,7混用,直接使用7即可

npm install  babel-loader@7.0.0

参考链接:
https://blog.csdn.net/u010565037/article/details/82855218

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容