echart php mysql简书_echarts-自定义构建
在學(xué)習(xí)自定義構(gòu)建工具的時(shí)候遇到了麻煩,官網(wǎng)寫的自定義有兩種辦法,跟著教程走了半天不幸的是兩種方法一直報(bào)錯(cuò),都未能成功。所以想把錯(cuò)誤記錄下來,請(qǐng)大家?guī)兔鉀Q一下,百度后幾種解決方法嘗試無果。好在網(wǎng)站提供自定義組件的圖形化自動(dòng)生成模式,可以在頁面生成自己想要的echart模版。
在安裝的時(shí)候這個(gè)模塊npm i rollup-plugin-uglify@3.0.0 需要安裝這個(gè)版本的否則使用會(huì)出問題
第一種錯(cuò)誤信息
//當(dāng)我們運(yùn)行這條命令的時(shí)候
node node_modules/echarts/build/build.js --min -i echarts.custom.js -o lib/echarts.custom.min.js
Bundles /Users/xinwang/Desktop/myProject/echarts.custom.js => /Users/xinwang/Desktop/myProject/lib/echarts.custom.min.js ...
Unknown input option: legacy. Allowed options: acorn, acornInjectPlugins, cache, chunkGroupingSize, context, experimentalCacheExpiry, experimentalOptimizeChunks, experimentalTopLevelAwait, external, inlineDynamicImports, input, manualChunks, moduleContext, onwarn, perf, plugins, preserveModules, preserveSymlinks, shimMissingExports, treeshake, watch
Error: Could not resolve entry (/Users/xinwang/Desktop/myProject/echarts.custom.js)
undefined
第二種自定義方式錯(cuò)誤信息
//當(dāng)我們運(yùn)行這條命令的時(shí)候
./node_modules/.bin/rollup -c
!) You have passed an unrecognized option
Unknown input option: name. Allowed options: acorn, acornInjectPlugins, cache, chunkGroupingSize, context, experimentalCacheExpiry, experimentalOptimizeChunks, experimentalTopLevelAwait, external, inlineDynamicImports, input, manualChunks, moduleContext, onwarn, perf, plugins, preserveModules, preserveSymlinks, shimMissingExports, treeshake, watch
./line.js → lib/line.min.js...
(!) Missing exports
https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-
line.js
init is not exported by node_modules/echarts/lib/echarts.js
9: // 基于準(zhǔn)備好的dom,初始化 echarts 實(shí)例并繪制圖表。
10: //console.log(echarts)
11: echarts.init(document.getElementById('main')).setOption({
^什么鬼說這里沒有這個(gè)方法
12: title: {text: 'Line Chart'},
13: tooltip: {},
(!) uglify plugin: The transformBundle hook used by plugin uglify is deprecated. The renderChunk hook should be used instead.
created lib/line.min.js in 801ms
總結(jié)
以上是生活随笔為你收集整理的echart php mysql简书_echarts-自定义构建的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: adobe reader java_使用
- 下一篇: qt5.5 静态编译 mysql_QT5