使用 cli 方式启动项目,如果自定义了 webpack 一些路径解析,就会报错文件查找失败:'$pluginUdesk
HbuilderX版本是2.9.3.20201014
package.json里引用了udesk_case_uniapp_plugins项目
"dependencies": {
"udesk-case-uniapp-plugins": "link:../udesk_case_uniapp_plugins"
},
vue.config.js里设置alias
module.exports = {
chainWebpack: (config) => {
config.resolve.alias
.set('$config', resolve('/config')).set("$pluginUdesk", resolve("./node_modules/udesk-case-uniapp-plugins"));
}
};
js文件里使用:
import pluginUdesk from "$pluginUdesk/src/common";
h5运行没有问题的,原生运行iOS模拟器就报错 文件查找失败:'$pluginUdesk。
能帮忙看下是哪需要配置下么?
19:26:39.122 nvue中不支持如下css。如全局或公共样式受影响,建议将告警样式写在ifndef APP-PLUS-NVUE的条件编译中,详情如下:
19:26:39.131 ERROR: property value auto
is not supported for margin-right
(only number and pixel values are supported) at pages/index/index.nvue:10
19:26:39.131 ERROR: property value auto
is not supported for margin-left
(only number and pixel values are supported) at pages/index/index.nvue:10
19:26:44.635 [警告] ../../udesk_case_uniapp_plugins/src/common/data/locations-data.js
文件体积超过 500KB,已跳过压缩以及 ES6 转 ES5 的处理,手机端使用过大的js库影响性能。
19:26:46.762 [警告] ../../udesk_case_uniapp_plugins/src/common/data/locations-data.js
文件体积超过 500KB,已跳过压缩以及 ES6 转 ES5 的处理,手机端使用过大的js库影响性能。
19:26:47.139 ERROR: Selector .page-login uni-image
is not supported. Weex only support single-classname selector at pages/login/login.nvue:32
19:26:47.140 ERROR: Selector .page-login .tab
is not supported. Weex only support single-classname selector at pages/login/login.nvue:34
19:26:47.155 ERROR: Selector .page-login .logo
is not supported. Weex only support single-classname selector at pages/login/login.nvue:36
19:26:47.156 ERROR: Selector .page-login .logo div
is not supported. Weex only support single-classname selector at pages/login/login.nvue:39
19:26:47.176 WARNING: background-position
is not a standard property name (may not be supported) at pages/login/login.nvue:40
19:26:47.197 WARNING: background-size
is not a standard property name (may not be supported) at pages/login/login.nvue:41
19:26:47.198 ERROR: Selector .page-login .tip
is not supported. Weex only support single-classname selector at pages/login/login.nvue:42
19:26:47.220 WARNING: display
is not a standard property name (may not be supported) at pages/login/login.nvue:43
19:26:47.221 ERROR: Selector .page-login .tip .rember
is not supported. Weex only support single-classname selector at pages/login/login.nvue:47
19:26:47.239 WARNING: display
is not a standard property name (may not be supported) at pages/login/login.nvue:48
19:26:47.239 ERROR: Selector .page-login .tip .rember .chkbox
is not supported. Weex only support single-classname selector at pages/login/login.nvue:56
19:26:47.254 ERROR: Selector .page-login .tip .forget
is not supported. Weex only support single-classname selector at pages/login/login.nvue:58
19:26:47.255 WARNING: cursor
is not a standard property name (may not be supported) at pages/login/login.nvue:63
19:26:47.268 ERROR: Selector .page-login .btn
is not supported. Weex only support single-classname selector at pages/login/login.nvue:64
19:26:48.020 DONE Build complete. Watching for changes...
19:26:48.032 项目 'udesk_case_2b_mobile' 编译成功。
19:26:48.033 Module Error (from ./node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js):
19:26:48.050 (Emitted value instead of an instance of Error) Error: undefined:34:5: missing '}'
19:26:48.084 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
19:26:48.100 TypeError: staticClass.trim is not a function
19:26:48.115 at parseStaticClass (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:4453:33)
19:26:48.129 at Array.transformNode (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:4414:13)
19:26:48.130 at processElement (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1738:28)
19:26:48.148 at closeElement (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1393:17)
19:26:48.149 at Object.start (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1586:9)
19:26:48.168 at handleStartTag (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:498:15)
19:26:48.169 at parseHTML (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:354:11)
19:26:48.187 at parse (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1481:3)
19:26:48.188 at baseCompile (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:4395:13)
19:26:48.206 at Object.compile (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:4370:22)
19:26:48.209 at compile (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:5040:25)
19:26:48.225 at compileTemplate (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/uni-template-compiler/lib/auto-components.js:75:15)
19:26:48.226 at compiler.compile (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/build/vue-loader.conf.js:115:10)
19:26:48.244 at actuallyCompile (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:70:96)
19:26:48.245 at compileTemplate (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:31:16)
19:26:48.261 at Object.module.exports (/Users/xuchen/Developer/Udesk/udesk_case_2b_mobile/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js:46:20)
19:26:48.262 文件查找失败:'$pluginUdesk/src/common' at pages/custom-object/edit.nvue:16
19:26:48.280 文件查找失败:'$pluginUdesk/src/common' at pages/custom-object/search.nvue:12
19:26:48.281 文件查找失败:'$pluginUdesk/src/common' at pages/my/my.nvue:22
19:26:48.300 文件查找失败:'$pluginUdesk/src/common' at pages/todo/index.nvue:14
19:26:48.301 文件查找失败:'$pluginUdesk/src/common/index' at pages/custom-object/view.nvue:14
19:26:48.322 文件查找失败:'$pluginUdesk/src/components/custom-ui/business/index' at pages/custom-object/edit.nvue:18
19:26:48.325 文件查找失败:'$pluginUdesk/src/components/custom-ui/custom-ui.vue' at pages/custom-object/new.nvue:14
19:26:48.340 文件查找失败:'$pluginUdesk/src/components/custom-ui/custom-ui.vue' at pages/custom-object/view.nvue:12
19:26:48.361 文件查找失败:'$pluginUdesk/src/components/custom-ui/custom-ui.vue' at pages/custom-object/edit.nvue:14
19:26:48.361 文件查找失败:'$pluginUdesk/src/components/field/business' at pages/custom-object/custom-object-base-mixin.nvue:10
19:26:48.384 文件查找失败:'$pluginUdesk/src/components/look-up-records/index.vue' at pages/custom-object/search.nvue:14
19:26:48.407 文件查找失败:'$pluginUdesk/src/components/look-up-records/index.vue' at pages/todo/index.nvue:16
19:26:48.428 文件查找失败:'$pluginUdesk/src/special-pages/custom-ui/button/edit-record.nvue' at special-pages/custom-ui/button/edit-record.nvue:8
19:26:48.430 文件查找失败:'$pluginUdesk/src/special-pages/custom-ui/quick-adding.nvue' at special-pages/custom-ui/quick-adding.nvue:8
19:26:48.453 文件查找失败:'$pluginUdesk/src/special-pages/custom-ui/related-record/choose-record.nvue' at special-pages/custom-ui/related-record/choose-record.nvue:8
19:26:48.454 文件查找失败:'$pluginUdesk/src/special-pages/custom-ui/related-record/view.nvue' at special-pages/custom-ui/related-record/view.nvue:8
19:26:48.478 文件查找失败:'$pluginUdesk/src/special-pages/look-up/look-up-owner/look-up-owner.nvue' at special-pages/look-up/look-up-owner/look-up-owner.nvue:8
19:26:48.479 文件查找失败:'$pluginUdesk/src/special-pages/look-up/look-up-records/look-up-records.nvue' at special-pages/look-up/look-up-records/look-up-records.nvue:8
19:26:48.513 文件查找失败:'$pluginUdesk/src/special-pages/look-up/look-up-user/look-up-user.nvue' at special-pages/look-up/look-up-user/look-up-user.nvue:8
19:26:48.517 ERROR Build failed with errors.
0 个回复