Closed Viktor19931 closed 2 years ago
What turned out to be the issue?
have same issue with nextjs in prod, can you please help? did you solved the issue?
Yes, the problem was that’s all routes should not redirect to index file
any suggestions how can i solve this issue. i have used nextjs.
I am sorry, I didn't quite catch the resolution - can you please elaborate a bit more on this? How should the routes be set up so that this error doesn't show up?
i am using the nextjs and have same issue on production server only and it works fine on local build as well as on dev, i dont have solution yet.
I have the same problem in Next.js production version. As far as I can tell, the library works normal even with the error, though.
yes but onChartReady () fun is not working? i need that.
The same issue. I'm trying to create electron app from existing web app. Web app with trading view iframe works, but inside electron it doesn't. Exactly the same error - this._innerWindow(...).widgetReady is not a function.
My issued is solved the problem was we were deployed the site on subdomain when we switched to main domain it worked fine. check the import path and library url in widget config and also the datafeed script is imported before the page in interactive.
This issue occur because import path for trading view is incorrect
This seems to occur with windows machines mainly, I have solved the issue by changing the library path from libraryPath: '/charting_library/',
to libraryPath: 'src/charting_library',
public static defaultProps: Omit<ChartContainerProps, 'container'> = {
symbol: 'AAPL',
interval: 'D' as ResolutionString,
datafeedUrl: 'https://demo_feed.tradingview.com',
libraryPath: 'src/charting_library',
chartsStorageUrl: 'https://saveload.tradingview.com',
chartsStorageApiVersion: '1.1',
clientId: 'tradingview.com',
userId: 'public_user_id',
fullscreen: false,
autosize: true,
studiesOverrides: {},
};
Where can get the copy for the charting_library folder?
I'm having the same issue, in nextjs, however, I give the correct path. Any ideas?
window.tvWidget = new TradingView.widget({
symbol: "Bitfinex:BTC/USD", // default symbol
interval: "1D", // default interval
fullscreen: true, // displays the chart in the fullscreen mode
container: "tv_chart_container",
datafeed: Datafeed,
library_path: "public/charting_library_clonned_data",
});
Hi, are you all using Cloudflare ?, Please turn off Rocket Loader™ to fix this issue.
I also had this issue. It was the locale param breaking the path to the html file. In my case the locale was being capitalised (taken from the url path) and the file did not exist. Could probably do with an error if the locale isn't valid.
Set libraryPath: 'charting_library/'
works for me.
Hi, are you all using Cloudflare ?, Please turn off Rocket Loader™ to fix this issue.
It worked for me!, thanks
got this error on prod build
charting_library.js:1 Uncaught (in promise) TypeError: this._innerWindow(...).widgetReady is not a function
any idea why its happen ?
appreciate for any help or suggestions!