-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WEBPACK error with tradingview #86
Comments
Hey, what version of charting library you have? |
the lastest one, i downloaded it a couple of days ago |
Can you please provide exact version you have? |
It is the VERSION 1.13 @ 2018-08-24 |
This is strange, because there is such export (for your version) and everything should work. |
@Cryptoforecast first of all please be careful in the next time with publishing the library in the public (your example contained the library's code). According your example. I download it, extract, run After adding |
Thank you @timocov, i am really sorry for my mistake. My bad! |
@timocov did you try doing a yarn build instead of just yarn start? It works fine when we run it but then it fails with
|
No, I didn't :( Unfortunately I already removed the code, could you please send it again here (but without charting library's code please)? |
This is happening on mine and it feels like the sample is pretty outdated (struggled to get it going). If you want, I think the easiest for me is to create another sample with the latest webpack etc. |
@timocov just to add, I've tried to create a sample from the latest create-react-app from scratch but getting different errors (it's even worse because. It's very hard to try and debug when I don't have the source to understand it. https://github.com/tbohnen/tv-example
|
@timocov Can you please confirm that the minified file is a umd build? Do you know whether it works with webpack 4? |
Ok, I created a workaround by just putting the trading view js file in a separate folder and doing an npm install so it's in node_modules and not part of my bundle. |
Yes, I confirm that.
That's why we've frozen version of react-scripts. |
charting_library_min_js__WEBPACK_IMPORTED_MODULE_6__.widget is not a constructor |
@galipmedia what did you do to get this error? |
I was trying as per the vue example to include it as - import {widget} from '../../path to tradingview' . I have since just included it in the head of my html and it works fine. |
I also use webpack and meet error too:
Local environment runs fine but failed on web browser version (static pages). ah sorry for the noise, my chart data is broken |
@manhnt9 and why are you asking here, not in https://github.com/tradingview/lightweight-charts ? Also, I don't think that it's related to the library itself, you need to check your webpack config (also, you can provide steps to repro it). |
The same problem, the React project is going to webpack. Tell us how to solve? Failed to compile Search for the keywords to learn more about each error. |
@Padavan-itbeard look at pinned issue #36 |
@timocov the second day I reread all the messages in this section. I can’t list all that I re-read. Answer for React and create-react-app heer https://medium.com/@jonchurch/tradingview-js-api-integration-tutorial-introduction-5e4809d9ef36 |
i facing the same issue as u do. |
The latest versions of the library includes not only umd module for |
I followed the following steps given in next js example.
But after I completed the step 3, I can't run
info - Creating an optimized production build ModuleNotFoundError: Module not found: Error: Can't resolve '../../static/charting_library/charting_library.min' in '/Users/nantha/Projc/my_projects/Noj View/nextjs-javascript/components/TVChartContainer' |
See #198. I think that we have to update our samples to work with 17+ version. @nantha42 what version of the library you use? Try to replace |
i used the 17+ version and have been following to change the but it gave me the error when compiled using ionic framework with some error in css file |
Did you got any solution for your issue? |
I am doing exactly as you said but I am getting this error:
|
I am using Next 13 and followed the nextjs-javascript and react-typescript. It's related with #310 I changed <Script src="/static/datafeeds/udf/dist/bundle.js"></Script> tag to <script src="/static/datafeeds/udf/dist/bundle.js" async></script>.Then disappeared UDFCompatibleDataFeed error and met this error. Hope all of your support |
I am using the latest tradingview library but create alerts button is not showing on the header. |
Hi!
i was trying to use the libary with React + react-scripts. Here is my code
i added the
charting_library
under SRC and added/* eslint-disable */
to charting_library.min.js but react gives me this error:It seens that widget is null....
Any idea?
The text was updated successfully, but these errors were encountered: