8***@qq.com
8***@qq.com
  • 发布:2020-04-14 11:34
  • 更新:2020-04-15 15:16
  • 阅读:1653

uni-app编译运行到手机报错,但h5和小程序是正常;

分类:uni-app

hbuildx编译运行app到手机报错如下:


Module build failed (from ./node_modules/@dcloudio/webpack-uni-pages-loader/lib/index.js):
11:21:35.804 TypeError: Cannot read property 'nvue' of undefined
11:21:35.813 at module.exports (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-pages-loader/lib/platforms/app-plus/index.v3.js:86:35)
11:21:35.813 at module.exports (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-pages-loader/lib/platforms/app-plus/index.js:502:33)
11:21:35.823 at Object.module.exports (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-pages-loader/lib/index-new.js:86:71)
11:21:35.826 at Object.module.exports (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-pages-loader/lib/index.js:49:35)
希望大佬们解惑指点一下

2020-04-14 11:34 负责人:无 分享
已邀请:
DCloud_heavensoft

DCloud_heavensoft

编译到app时,pages.json里配的页面,会优先走nvue文件。如果有个页面a,同时存在a.vue和a.nvue,那么app端会把a.nvue编译进去。

1***@qq.com

1***@qq.com

同样的问题

  • 8***@qq.com (作者)

    我新建了个项目

    2020-04-15 16:08

该问题目前已经被锁定, 无法添加新回复