最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

解決vue安裝less報錯Failed to compile with 1 errors的問題

 更新時間:2020年10月22日 09:58:37   作者:lilongwei4321  
這篇文章主要介紹了解決vue安裝less報錯Failed to compile with 1 errors的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

1、創(chuàng)建vue項目后安裝less,執(zhí)行 npm install less less-loader --save-dev

下載版本為:less-loader@6.1.0 , less@3.11.3,重啟服務(wù)報錯,報錯信息如下:

2、報錯原因 less 本版太高需要降低版本,執(zhí)行代碼

先移除之前版本:

npm uninstall less-loader

下載指定版本:

npm install less-loader@5.0.0 -D

3、重啟代碼就可以了,若還是報錯可移除文件node_modules,重新下載cnpm install

補充知識:vue項目運行報錯:94% asset optimization ERROR Failed to compile with 2 errors13:03:01 error in ./src/ba

使用vue編寫的前端項目運行報錯:

88% hashing
89% module assets processing
90% chunk assets processing
94% asset optimization ERROR Failed to compile with 2 errors13:03:01
error in ./src/base/components/head.vue
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (72)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.2
at module.exports (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\node-sass\lib\binding.js:13:13)
at Object.<anonymous> (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at loadLoader (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\loader-runner\lib\loadLoader.js:13:17)

@ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":false}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-1340bee1","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0&bustCache!./src/base/components/head.vue 4:14-395 13:3-17:5 14:22-403
@ ./src/base/components/head.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./src/module/home/page/home.vue
@ ./src/module/home/page/home.vue
@ ./src/module/home/router/index.js
@ ./src/base/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:11000 webpack/hot/dev-server ./src/main.js

error in ./src/module/home/page/home.vue

Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (72)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.2
at module.exports (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\node-sass\lib\binding.js:13:13)
at Object.<anonymous> (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at loadLoader (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\loader-runner\lib\loadLoader.js:13:17)

出錯原因就是sass不支持當前的環(huán)境,那么在當前環(huán)境重新安裝一下就好了

1、查看本地nodejs的版本號和node-sass的版本號

node -v ---查看nodejs的版本號以及查看其是否安裝

node-sass -v ---查看node-sass的版本號以及查看其是否安裝

2.、卸載node-sass,但是如果卸載不成功,直接找到node-sass文件夾,刪除

npm uninstall --save node-sass --記住執(zhí)行這個命令前,需要先進入到對應(yīng)的文件目錄才可以刪除

如圖(如下圖即可):

3、重新安裝更新版本的node-sass即可

npm install --save node-sass (cnpm install --save node-sass )

(這個也要在指定文件夾執(zhí)行,并進行本地安裝)

這樣就可以了!?。。。。。。?!

如下圖所示:

以上這篇解決vue安裝less報錯Failed to compile with 1 errors的問題就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • Vue做一個簡單的隨機點名冊

    Vue做一個簡單的隨機點名冊

    這篇文章主要介紹的是如何用Vue做一個簡單的隨機點名冊,主要是做個簡單的點名器,不做樣式,需要的朋友可以參考一下,希望對你有所幫助
    2021-12-12
  • vue一步到位的實現(xiàn)動態(tài)路由

    vue一步到位的實現(xiàn)動態(tài)路由

    這篇文章主要介紹了vue一步到位的實現(xiàn)動態(tài)路由,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-06-06
  • Vue全局變量的定義及使用方法

    Vue全局變量的定義及使用方法

    這篇文章主要給大家介紹了關(guān)于Vue全局變量的定義及使用的相關(guān)資料,定義完全局變量后,我們可以在程序中的任何地方使用它們,文中通過代碼介紹的非常詳細,需要的朋友可以參考下
    2023-09-09
  • vue-cli3全面配置詳解

    vue-cli3全面配置詳解

    這篇文章主要介紹了vue-cli3全面配置詳解,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-11-11
  • VUE前端實現(xiàn)token的無感刷新3種方案(refresh_token)

    VUE前端實現(xiàn)token的無感刷新3種方案(refresh_token)

    這篇文章主要給大家介紹了關(guān)于VUE前端實現(xiàn)token的無感刷新3種方案(refresh_token)的相關(guān)資料,為了提供更好的用戶體驗,我們可以通過實現(xiàn)Token的無感刷新機制來避免用戶在使用過程中的中斷,需要的朋友可以參考下
    2023-11-11
  • vue使用Highcharts實現(xiàn)3D餅圖

    vue使用Highcharts實現(xiàn)3D餅圖

    這篇文章主要為大家詳細介紹了vue使用Highcharts實現(xiàn)3D餅圖,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • vue+openlayer5獲取當前鼠標滑過的坐標實現(xiàn)方法

    vue+openlayer5獲取當前鼠標滑過的坐標實現(xiàn)方法

    在vue項目中怎么獲取當前鼠標劃過的坐標呢?下面通過本文給大家分享實現(xiàn)步驟,感興趣的朋友跟隨小編一起看看吧
    2021-11-11
  • Vue深入講解數(shù)據(jù)響應(yīng)式原理

    Vue深入講解數(shù)據(jù)響應(yīng)式原理

    應(yīng)用會對用戶的操作進行反饋,就叫響應(yīng)式,數(shù)據(jù)變化會實時改變UI,就叫數(shù)據(jù)響應(yīng)式,修改Vue實例中的數(shù)據(jù)時,視圖會重新渲染,就是Vue的數(shù)據(jù)響應(yīng)式
    2022-05-05
  • Vue的異步組件加載的實現(xiàn)方法小結(jié)

    Vue的異步組件加載的實現(xiàn)方法小結(jié)

    在 Vue 中,異步組件是指那些在需要時才會被加載的組件,與傳統(tǒng)的靜態(tài)組件不同,異步組件通過動態(tài)加載的方式,可以有效地減少初始加載的資源和時間,在 Vue 中實現(xiàn)異步組件加載非常簡單,開發(fā)者有多種方法可以做到,本文給大家介紹了一些常用的實現(xiàn)方法
    2024-11-11
  • 詳解如何實現(xiàn)Vue組件的動態(tài)綁定

    詳解如何實現(xiàn)Vue組件的動態(tài)綁定

    Vue.js 是一個漸進式框架,用于構(gòu)建用戶界面,在開發(fā)過程中,我們經(jīng)常需要根據(jù)不同的條件動態(tài)顯示組件,在本文中,我將詳細介紹如何實現(xiàn)Vue組件的動態(tài)綁定,提供示例代碼,以幫助你更深入地理解這個概念,需要的朋友可以參考下
    2024-11-11

最新評論

沙雅县| 自治县| 丰城市| 普安县| 宁乡县| 桃江县| 宁津县| 乐业县| 汽车| 南乐县| 开远市| 太谷县| 大田县| 西峡县| 贵溪市| 江安县| 宁陕县| 临洮县| 陇西县| 广昌县| 濉溪县| 巴林右旗| 江西省| 定襄县| 锡林郭勒盟| 吉林省| 嘉义市| 顺平县| 青河县| 罗平县| 韶关市| 平邑县| 嘉定区| 安泽县| 沁阳市| 满城县| 白河县| 饶阳县| 兴文县| 神木县| 柘荣县|