apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.48k stars 19.62k forks source link

Install echarts using github link #13091

Closed sgurin closed 4 years ago

sgurin commented 4 years ago

Version

4.8.0

Steps to reproduce

I was trying to install echarts using GitHub link https://github.com/apache/incubator-echarts#4.8.0 and there is no any lib folder. Also, missing main directive for NPM.

What is expected?

Ok

What is actually happening?

ERROR Failed to compile with 49 errors These relative modules were not found:

./lib/chart/bar in ./node_modules/echarts/index.js ./lib/chart/boxplot in ./node_modules/echarts/index.js ./lib/chart/candlestick in ./node_modules/echarts/index.js ./lib/chart/custom in ./node_modules/echarts/index.js ./lib/chart/effectScatter in ./node_modules/echarts/index.js ./lib/chart/funnel in ./node_modules/echarts/index.js ./lib/chart/gauge in ./node_modules/echarts/index.js ./lib/chart/graph in ./node_modules/echarts/index.js


If package was downloaded via NPM it has lib folder. Unfortunately I cannot use NPM. What I am doing wrong?

echarts-bot[bot] commented 4 years ago

Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! 🍵

HHHui commented 4 years ago

npm install echarts --save maybe you can check the tutorial.

sgurin commented 4 years ago

Unfortunately I cannot use NPM Package. Is there any way to install plugin thrown link? For example npm install https://github.com/apache/incubator-echarts#4.8.0

HHHui commented 4 years ago

maybe just use dist/echarts.min.js or use cdn https://cdnjs.cloudflare.com/ajax/libs/echarts/4.8.0/echarts.min.js ?

sgurin commented 4 years ago

So, there is no way to install echarts via NPM by direct link to the GitHub repo?

npm install https://github.com/apache/incubator-echarts#4.8.0

plainheart commented 4 years ago

@sgurin It can be installed as follows.

npm install https://github.com/apache/incubator-echarts.git#4.8.0
sgurin commented 4 years ago

Ok. Why the packages are different?

There is lib folder if I install echarts npm install echartshttps://prnt.sc/tvhazs but via GitHub link it is not there https://prnt.sc/tvhbiz

plainheart commented 4 years ago

The lib folder is generated after building. Installing from Github link is just to clone the repository without a release building, so this is different from NPM. But you are still able to run the release command in the root of echarts to generate the lib folder.

npm run release

Hope that helps.

sgurin commented 4 years ago

Yeap, That exactly what I asked for.