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)
希望大佬们解惑指点一下


·回复

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

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Scroll Up