randy重名了
randy重名了
  • 发布:2021-04-19 12:23
  • 更新:2021-10-19 03:35
  • 阅读:1704

nvue界面运行不了

分类:nvue

问题:
在一个正常使用的 uniapp 项目 添加一个空白 nvue 界面,报错,该nvue界面也打不开。

想请教下,这种情况如何处理,是否必须要把nvue 不支持的css处理掉才行吗?


//nvue 界面  

<template>  
    <view>  
        <text>123</text>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  

            }  
        },  
        onLoad:function(){  
            console.log("test nvue")  
        },  
        methods: {  

        }  
    }  
</script>  

<style>  

</style>  

错误提示:

12:16:49.701 nvue中不支持如下css。如全局或公共样式受影响,建议将告警样式写在ifndef APP-PLUS-NVUE的条件编译中,详情如下:  
12:16:49.714 WARNING: `-webkit-font-smoothing` is not a standard property name (may not be supported) at App.vue:52  
12:16:49.720 WARNING: `-moz-osx-font-smoothing` is not a standard property name (may not be supported) at App.vue:53  
12:16:49.728 WARNING: `content` is not a standard property name (may not be supported) at App.vue:56  
12:16:49.729 WARNING: `content` is not a standard property name (may not be supported) at App.vue:59  
12:16:49.734 WARNING: `content` is not a standard property name (may not be supported) at App.vue:62  
12:16:49.739 WARNING: `content` is not a standard property name (may not be supported) at App.vue:65  
12:16:49.968 ERROR: property value `` is not supported for `padding-right` (only number and pixel values are supported) at App.vue:440  
12:16:49.975 ERROR: property value `` is not supported for `padding-left` (only number and pixel values are supported) at App.vue:440  
12:16:49.982 ERROR: property value `` is not supported for `padding-right` (only number and pixel values are supported) at App.vue:494  
12:16:49.989 ERROR: property value `` is not supported for `padding-left` (only number and pixel values are supported) at App.vue:494  

12:16:50.680 ERROR: Selector `::-webkit-scrollbar` is not supported. Weex only support classname selector at App.vue:3419  
12:16:50.687 WARNING: `display` is not a standard property name (may not be supported) at App.vue:3420  
12:16:50.698 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js):  
12:16:50.699 TypeError: Cannot read property '1' of null  
12:16:50.708     at transition (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:24:8)  
12:16:50.708     at declarations.reduce (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:201:28)  
12:16:50.717     at Array.reduce (<anonymous>)  
12:16:50.726     at module.exports (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:198:23)  
12:16:50.726     at E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\index.js:87:31  
12:16:50.735     at Array.forEach (<anonymous>)  
12:16:50.735     at Object.parse (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\index.js:80:26)  
12:16:50.742     at genStyleString (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\style.js:36:10)  
12:16:50.742     at Object.module.exports (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\style.js:8:45)  
12:16:50.750  DONE  Build complete. Watching for changes...  
12:16:50.751 项目 'app_uni' 编译成功。  
12:16:50.758 WARNING: Module Warning (from ./node_modules/postcss-loader/src/index.js):  
12:16:50.766 Warning  

12:16:50.826 (87:2) start value has mixed support, consider using flex-start instead  
12:16:50.835  ERROR  Build failed with errors.  
2021-04-19 12:23 负责人:无 分享
已邀请:
randy重名了

randy重名了 (作者)

我把其他样式删了,出现了这个

12:34:24.086 编译器版本:3.1.8(v3)详见:https://ask.dcloud.net.cn/article/36599。  
12:34:24.093 请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。  
12:34:24.104 正在编译中...  
12:34:28.878 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js):  
12:34:28.884 TypeError: Cannot read property '1' of null  
12:34:28.884     at transition (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:24:8)  
12:34:28.888     at declarations.reduce (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:201:28)  
12:34:28.889     at Array.reduce (<anonymous>)  
12:34:28.894     at module.exports (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:198:23)  
12:34:28.900     at E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\index.js:87:31  
12:34:28.900     at Array.forEach (<anonymous>)  
12:34:28.906     at Object.parse (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\index.js:80:26)  
12:34:28.906     at genStyleString (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\style.js:36:10)  
12:34:28.912     at Object.module.exports (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\style.js:8:45)  
12:34:42.060 WARNING: Module Warning (from ./node_modules/postcss-loader/src/index.js):  
12:34:42.060 Warning  
12:34:42.066 (219:2) start value has mixed support, consider using flex-start instead  
12:34:42.066 Module Warning (from ./node_modules/postcss-loader/src/index.js):  
12:34:42.073 Warning  
12:34:42.080 (41:2) start value has mixed support, consider using flex-start instead  
12:34:42.089 Module Warning (from ./node_modules/postcss-loader/src/index.js):  
12:34:42.090 Warning  
12:34:42.096 (87:2) start value has mixed support, consider using flex-start instead  
12:34:42.240  DONE  Build complete. Watching for changes...  
12:34:42.249 项目 'app_uni' 编译成功。  
12:34:42.255  ERROR  Build failed with errors.
小周爱学习

小周爱学习

我的bug,我在vue页面中的style添加了一个lang=scss就解决了

    .addBankCard {  
      width: 100%;  
      height: 100rpx;  
      position: fixed;  
      bottom: 0rpx;  
    }  
    .item {  
      display: flex;  
      padding: 20rpx;  
    }  
    image {  
      width: 120rpx;  
      flex: 0 0 120rpx;  
      height: 120rpx;  
      margin-right: 20rpx;  
      border-radius: 12rpx;  
    }  
    .title {  
      text-align: left;  
      font-size: 36rpx;  
      color: $u-content-color;  
      margin-top: 20rpx;  
    }  
    .bank_card_info {  
      margin-top: -20rpx;  
      display: flex;  
      flex-direction: column;  
    }  

</style>
  • randy重名了 (作者)

    谢谢,用你的办法可行。他们官方的模板有问题也不处理下。

    2021-11-12 12:19

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