首页 > 其他分享 >vue 报错 !!vue-style-loader!css-loader?{“sourceMap“:true}!.

vue 报错 !!vue-style-loader!css-loader?{“sourceMap“:true}!.

时间:2023-06-13 15:09:56浏览次数:42  
标签:style vue .. loader sourceMap 报错 true


npm run dev 报错

These dependencies were not found:

* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-858b20d4","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./diyCoupon.vue in ./src/diy/diyCoupon.vue
* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-a87ce868","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./consumeClient.vue in ./src/pageSales/consumeClient.vue
* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-5f7603b6","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./orderStatistics.vue in ./src/pageSales/orderStatistics.vue
* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-67910de7","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./fenchengAnalyze.vue in ./src/pageSales/fenchengAnalyze.vue
* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-7951aa06","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./fenchengDetail.vue in ./src/pageSales/fenchengDetail.vue
* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-838c54ca","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./visitClient.vue in ./src/pageSales/visitClient.vue

To install them, you can run: npm install --save !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-858b20d4","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./diyCoupon.vue !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-a87ce868","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./consumeClient.vue !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-5f7603b6","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./orderStatistics.vue !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-67910de7","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./fenchengAnalyze.vue !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-7951aa06","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./fenchengDetail.vue !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-838c54ca","scoped":true,"hasInlineConfig":false}!px2rem-loader?{"remUnit":37.5}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./visitClient.vue

解决方案
此类问题一般是缺少相关依赖而导致的,对于本例,仔细看一下报错提示信息,抓住关键词,vue-style-loader!css-loader,说明是css解析的时候出了问题。
所以,解决方案就要根据情况而定,看你使用的CSS语言是什么,是 常规的 或者 less 或者 sass。

输入命令,不知道是什么,三个都执行一遍

npm install stylus-loader css-loader style-loader --save-dev
npm install less less-loader --save-dev
npm install sass sass-loader --save-dev

执行完后再执行 npm run dev
再报错

UnhandledPromiseRejectionWarning: TypeError: loaderContext.getResolve is not a function

这时会卡住,进度条不会往下进行
这是安装的 less 版本太高,安装个低版本即可

npm install [email protected] -D

再次运行 npm run dev 执行成功


标签:style,vue,..,loader,sourceMap,报错,true
From: https://blog.51cto.com/u_16159391/6470194

相关文章

  • window下正常的springboot到mac下运行却报错
    Errorcreatingbeanwithname'defaultValidator'definedinclasspathresource[org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]:Invocationofinitmethodfailed;nestedexceptionisjava.lang.NoClassDefFoun......
  • php json_encode方法 报错:Inf and NaN cannot be JSON encoded
    json_encode返回falsevar_dump(json_encode($array));通过json_last_error_msg查看报错原因echojson_last_error_msg();InfandNaNcannotbeJSONencoded原因是$array里面包含了NAN和INF这些导致的解决方案如下:echojson_encode(unserialize(str_replace(array('NAN;',......
  • 在使用VScode编辑器vue开发过程中,v-for在Eslint的规则检查下出现报错:Elements in iter
    报错如下: 该怎么解决呢?现在说说解决他的两种方法:1.直接在v-for循环后面绑定一个属性,跟前面需要循环的属性一一对应,截图如下:  2.在vscode中去掉Eslint规则检查,具体操作截图如下:文件–》首选项–》设置–》在搜索框中输入:vetur.validation.template,找到之后将前面的打钩......
  • js WebUploader 分片上传
    ​ 需求:项目要支持大文件上传功能,经过讨论,初步将文件上传大小控制在500M内,因此自己需要在项目中进行文件上传部分的调整和配置,自己将大小都以501M来进行限制。 第一步:前端修改由于项目使用的是BJUI前端框架,并没有使用框架本身的文件上传控件,而使用的基于jQuery的Uploadify......
  • vue中v-model理解
    1.原理v-model是语法糖,相当于以下代码<inputv-model="value>/>等价于<input:value="value"v-on:input="this.value=$event.target.value"/>v-bind:value实现数据从data->组件input触摸事件实现数据从组件->datav-model在内部为不同的输入元素使用不同的属性并抛......
  • 直播软件app开发,vue里tab菜单横向展示,可分页功能组件实现
    直播软件app开发,vue里tab菜单横向展示,可分页功能组件实现子组件: <template><div>  <el-buttonv-if="move!=0&&!dataLen"size='small'icon="el-icon-arrow-left"@click="navPrev"></el-button>   <ulref......
  • 创建vue工程
    一、创建项目(1)elementui elementui就是基于vue的一个ui框架,该框架基于vue开发了很多相关组件,方便我们快速开发页面。 网页链接:https://element.eleme.cn/#/zh-CN/component/installation ......
  • vue时间选择器 nut-datepicker
    vue时间选择器https://blog.csdn.net/Marshall_Ma/article/details/1242444511、年-月-日时:分效果展示:打开选择器:<divclass="label">记录日期:</div><nut-cell:showIcon="true":isLink="true"@click.native="switchPicker"......
  • 前端vue自定义简单实用下拉筛选 下拉菜单
    前端vue自定义简单实用下拉筛选下拉菜单, 下载完整代码请访问: https://ext.dcloud.net.cn/plugin?id=13020效果图如下:   ####使用方法```使用方法<!--titleArr:选择项数组dropArr:下拉项数组@finishDropClick:下拉筛选完成事件--><ccDropDownMenu:tit......
  • java WebUploader 分片上传
    ​ 对于大文件的处理,无论是用户端还是服务端,如果一次性进行读取发送、接收都是不可取,很容易导致内存问题。所以对于大文件上传,采用切块分段上传,从上传的效率来看,利用多线程并发上传能够达到最大效率。 本文是基于springboot+vue实现的文件上传,本文主要介绍服务端实现文件......