-
Notifications
You must be signed in to change notification settings - Fork 181
TypeError: window.TradingView is undefined #10
Comments
The charting library isnt included, you need to download it separately from
tradingview
…On Fri, Mar 22, 2019 at 9:50 AM AndriusDK ***@***.***> wrote:
Hello whenever I try to reuse the component i get the following error
TypeError: window.TradingView is undefined
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMUR2_QQaIDG9ZoE_QH5JwXaOBPaDPCpks5vZN-ggaJpZM4cDnOn>
.
|
Hello again the thing is that I have the libraries included from the private repository. Just I have my webapp in react and I try to include your implementation files to my project. |
TypeError: Cannot read property 'onready' of undefined |
same error |
Yes, I'm getting the same error as well, and I have included the charting library properly. I figured out the problem: in the repo nothing is ever imported from the charting library, so of course TradingView is undefined; it's never imported! I fixed and got it to work by importing
in my code instead of this repo's window.TradingView.onready implementation. @AndriusDK @nicqchen @jianqiangsong let me know if this works for you guys and if you're still stuck I'd be happy to make a PR to the repo so you can see what to do. Good luck! |
It works thanks! |
@BStephenBB can you please provide complete code as i am unable to make this working |
Does anybody have a solution on this? I am also getting the same error "TypeError: window.TradingView is undefined". I have included charting library. |
@vnsfin @drajvat See my comment above on how to get this working, I put the important lines of code there. I'm very busy right now, but can provide a full file-example later when I get the time if it's still not working for you guys. |
Can anyone post the line of importing the Widget? |
Hei. I've tried to insert your solution in my index.jsx but i get that error. Can you please provide the whole file? My index.jsx file looks like this: |
You already have a widgetOptions so you don't have to add it https://s3.tradingview.com/tv.js Edit : sorry i'm talking about somethink else |
@BStephenBB |
using this into /src/components/TVChartContainer/index.jsx What is wrong with my import? |
I've solved. Maybe is useful for someone else.
|
@miky9585 Thank you soo much that fixed it |
Hi @miky9585 @daveb1392 I've been trying to follow the above steps but i don't seem to get it right, can you please. i'm definitely sure that my importing is not right. i need to get this charting library soon. i don't have experience in programming but i have learnt most of the things on the internet... we can even communicate through Skype or Teamviewer when necessary. Thank you. |
I followed jonchurch's part1 instruction, I got this error. |
Maybe is useful for someone else.
|
In the recent version of charting library, charting_library.min.js is missing. I solved it by using charting_library.js instead. |
Hello whenever I try to reuse the component TVChartContainer /> i get the following error TypeError: window.TradingView is undefined
The text was updated successfully, but these errors were encountered: