我與vue和vue-bulma選項卡有這個奇怪的錯誤。TypeError:嘗試使用vue-bulma-tabs時數據必須是字符串或緩衝區
Project is running at http://localhost:8081/
webpack output is served from /dist/
404s will fallback to /index.html
crypto.js:74
this._handle.update(data, encoding);
^
TypeError: Data must be a string or a buffer
at TypeError (native)
at Hash.update (crypto.js:74:16)
at HarmonyExportImportedSpecifierDependency.updateHash (/Users/esteban/Projects/experiments/example1/node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js:144:8)
at /Users/esteban/Projects/experiments/example1/node_modules/webpack/lib/DependenciesBlock.js:33:5
at Array.forEach (native)
at NormalModule.DependenciesBlock.updateHash (/Users/esteban/Projects/experiments/example1/node_modules/webpack/lib/DependenciesBlock.js:32:20)
at NormalModule.Module.updateHash (/Users/esteban/Projects/experiments/example1/node_modules/webpack/lib/Module.js:162:41)
at NormalModule.updateHash (/Users/esteban/Projects/experiments/example1/node_modules/webpack/lib/NormalModule.js:327:30)
at modules.forEach.m (/Users/esteban/Projects/experiments/example1/node_modules/webpack/lib/Chunk.js:253:31)
at Array.forEach (native)
我認爲是有關webpack,但我沒有得到什麼問題或如何解決它。
重現它,只是這樣做
vue init webpack-simple example1
cd example1
npm i
npm i -S bulma vue-bulma-tabs
然後將其添加到main.js文件
import {Tabs, TabPane} from 'vue-bulma-tabs'
然後運行
npm run dev
等瞧!有錯誤。我錯過了什麼?
確實找不到它,但問題是vue-bulma-tabs包使用不帶擴展名的vue文件加載,而使用vue cli創建的項目默認情況下不啓用該選項。主要問題是無法導入的文件不在我的項目代碼中,但是我正在加載一些軟件包。 – mcniac
@carlous正是......這是根本原因 –
這是非常有益的,謝謝卡洛斯! –