第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

按推薦按需引入vant啟動服務(wù)時依然報找不到vant的兩個相關(guān)依賴

"dependencies": {

"axios": "^0.19.0",

"core-js": "^2.6.5",

"vant": "^2.0.9",

"vue": "^2.6.10",

"vue-router": "^3.0.3",

"vuex": "^3.0.1"

},

"devDependencies": {

"@vue/cli-plugin-babel": "^3.9.0",

"@vue/cli-plugin-eslint": "^3.9.0",

"@vue/cli-service": "^3.9.0",

"@vue/eslint-config-prettier": "^4.0.1",

"babel-eslint": "^10.0.1",

"babel-plugin-import": "^1.12.0",

"eslint": "^5.16.0",

"eslint-plugin-vue": "^5.0.0",

"sass": "^1.18.0",

"sass-loader": "^7.1.0",

"vue-template-compiler": "^2.6.10"

}

以上可以看到我的全局dependency中已成功安裝vant 2.0.9 而開發(fā)環(huán)境已成功安裝babel-plugin-import 1.12.0

module.exports = {

presets: ["@vue/app"],

plugins: [

['import', {

libraryName: 'vant',

libraryDirectory: 'es',

style: true

}, 'vant']

]

};

而對應(yīng)的babel.config.js文件也添加了vant的plugin如上圖

<template>

<div>

<van-button type="primary">Primary</van-button>

</div>

</template>


<script>

import axios from 'axios';

import {Button} from 'vant';


export default {

name: 'contatcList',

components: {

[Button.name] : Button

},

created() {

}

}

</script>

最后也在相應(yīng)的自定義組件ContactList.vue中import且在components中注冊并在template中使用 可起服務(wù)的時候依然報找不到vant對應(yīng)的兩個依賴 不知道哪位大神能幫忙解答 感激涕零>_<

These dependencies were not found:


* vant/es/button in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0

-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/ContactList.vue?vue&type=script&lang=js&

* vant/es/button/style in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??

ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/ContactList.vue?vue&type=script&lang=js&


To install them, you can run: npm install --save vant/es/button vant/es/button/style


P.S.: 即使我嘗試了跑以上推薦的命令?npm install --save vant/es/button vant/es/button/style 依然還是會報錯 所以只好post在這里看大家有沒有遇到過類似的問題了>_<

正在回答

4 回答

有同樣的問題

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

精慕門0373414

剛才解決了,樓上的方法我試了下,可以了,重新執(zhí)行npm install
2020-04-14 回復(fù) 有任何疑惑可以回復(fù)我~

我重新執(zhí)行npm install就可以解決,大家可以試一下

1 回復(fù) 有任何疑惑可以回復(fù)我~

求答案,解決了?

0 回復(fù) 有任何疑惑可以回復(fù)我~

百度搜索下

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

按推薦按需引入vant啟動服務(wù)時依然報找不到vant的兩個相關(guān)依賴

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號