亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

解決vue安裝less報(bào)錯(cuò)Failed to compile with 1 errors的問題

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

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

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

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

先移除之前版本:

npm uninstall less-loader

下載指定版本:

npm install less-loader@5.0.0 -D

3、重啟代碼就可以了,若還是報(bào)錯(cuò)可移除文件node_modules,重新下載cnpm install

補(bǔ)充知識(shí):vue項(xiàng)目運(yùn)行報(bào)錯(cuò):94% asset optimization ERROR Failed to compile with 2 errors13:03:01 error in ./src/ba

使用vue編寫的前端項(xiàng)目運(yùn)行報(bào)錯(cuò):

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)

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

1、查看本地nodejs的版本號(hào)和node-sass的版本號(hào)

node -v ---查看nodejs的版本號(hào)以及查看其是否安裝

node-sass -v ---查看node-sass的版本號(hào)以及查看其是否安裝

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

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

如圖(如下圖即可):

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

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

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

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

如下圖所示:

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

相關(guān)文章

  • vue 解決setTimeOut和setInterval函數(shù)無效報(bào)錯(cuò)的問題

    vue 解決setTimeOut和setInterval函數(shù)無效報(bào)錯(cuò)的問題

    這篇文章主要介紹了vue 解決setTimeOut和setInterval函數(shù)無效報(bào)錯(cuò)的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    2020-07-07
  • Vue組件傳參11種方式舉例介紹

    Vue組件傳參11種方式舉例介紹

    這篇文章主要給大家介紹了關(guān)于Vue組件傳參11種方式的相關(guān)資料,文中通過代碼示例介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用vue具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2023-09-09
  • vue單向數(shù)據(jù)流的深入理解

    vue單向數(shù)據(jù)流的深入理解

    隨著前端的項(xiàng)目的越來越復(fù)雜,出現(xiàn)了一堆概念來降低開發(fā)的復(fù)雜性,單向數(shù)據(jù)流就是其中一個(gè),下面這篇文章主要給大家介紹了關(guān)于vue單向數(shù)據(jù)流的相關(guān)資料,文中通過實(shí)例代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2022-01-01
  • Vue動(dòng)態(tài)數(shù)據(jù)實(shí)現(xiàn)?el-select?多級(jí)聯(lián)動(dòng)、數(shù)據(jù)回顯方式

    Vue動(dòng)態(tài)數(shù)據(jù)實(shí)現(xiàn)?el-select?多級(jí)聯(lián)動(dòng)、數(shù)據(jù)回顯方式

    這篇文章主要介紹了Vue動(dòng)態(tài)數(shù)據(jù)實(shí)現(xiàn)?el-select?多級(jí)聯(lián)動(dòng)、數(shù)據(jù)回顯方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-07-07
  • Vuejs 頁(yè)面的區(qū)域化與組件封裝的實(shí)現(xiàn)

    Vuejs 頁(yè)面的區(qū)域化與組件封裝的實(shí)現(xiàn)

    本篇文章主要介紹了Vuejs 頁(yè)面的區(qū)域化與組件封裝的實(shí)現(xiàn)。小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-09-09
  • Vue非父子組件之間的通信方式詳解

    Vue非父子組件之間的通信方式詳解

    在實(shí)際業(yè)務(wù)中,除了父子組件通信外,還有很多非父子組件通信的場(chǎng)景,下面這篇文章主要給大家介紹了關(guān)于Vue非父子組件之間的通信方式,文中通過實(shí)例代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2022-07-07
  • vue3中?provide?和?inject?用法小結(jié)

    vue3中?provide?和?inject?用法小結(jié)

    父子組件傳遞數(shù)據(jù)時(shí),使用的是props和emit,父?jìng)髯訒r(shí),使用的是?props,如果是父組件傳孫組件時(shí),就需要先傳給子組件,子組件再傳給孫組件,如果多個(gè)子組件或多個(gè)孫組件使用時(shí),就需要傳很多次,會(huì)很麻煩,這篇文章主要介紹了vue3中?provide?和?inject?用法,需要的朋友可以參考下
    2023-11-11
  • vue2.0父子組件及非父子組件之間的通信方法

    vue2.0父子組件及非父子組件之間的通信方法

    這篇文章給大家介紹了vue2.0父子組件及非父子組件之間的通信方法,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友參考下吧
    2017-01-01
  • Vue數(shù)據(jù)驅(qū)動(dòng)模擬實(shí)現(xiàn)4

    Vue數(shù)據(jù)驅(qū)動(dòng)模擬實(shí)現(xiàn)4

    這篇文章主要介紹了Vue數(shù)據(jù)驅(qū)動(dòng)模擬實(shí)現(xiàn)的相關(guān)資料,介紹了Array的變異方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-01-01
  • Vue3實(shí)戰(zhàn)學(xué)習(xí)配置使用vue?router路由步驟示例

    Vue3實(shí)戰(zhàn)學(xué)習(xí)配置使用vue?router路由步驟示例

    這篇文章主要為大家介紹了Vue3實(shí)戰(zhàn)學(xué)習(xí)配置使用vue?router路由步驟示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-06-06

最新評(píng)論