[Solved] Import Echars5.0 Error: “export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

Questions

When introducing ecars 5.0, an error “export ‘default’ (imported as’ ecarts’) was not found in ‘ecarts’ was encountered

solve

The introduction method is changed to:

import * as echarts from 'echarts';
// or
const echarts = require('echarts');


Read More: