Closed omgvamp closed 5 years ago
How did you fix it?
@omgvamp How did you fix this?
@zrubenst did you fix this?
@kolyabamberg you using React? Disable the built in service worker. If you need a service worker you’ll need to find a different solution or figure out how to disable the service worker for the trading view library folder in the public directory.
Check this solution, it worked for me: https://github.com/tradingview/charting-library-examples/issues/110#issuecomment-519492498
If anyone still having the same issue, this is how I managed to fix it.
As far as my knowledge goes, the problem occurs because react rewrites static files in production and cannot access charting_library directory.
Since we are running the production server with serve, we need to configure it a bit.
serve-handle
dependency. here is it's documentationserve.json
in the public
directory (same level as your index.html file)
3 copy the following code into your newly created file
{
"cleanUrls": false
}
Now you should re-build your application and re-run you server. After these changes I managed to use the -s flag and TradingView together, without any issues.
Hope this will help someone and save you some valuable time.
If anyone still having the same issue, this is how I managed to fix it.
As far as my knowledge goes, the problem occurs because react rewrites static files in production and cannot access charting_library directory.
Since we are running the production server with serve, we need to configure it a bit.
- install
serve-handle
dependency. here is it's documentation- create a file named
serve.json
in thepublic
directory (same level as your index.html file) 3 copy the following code into your newly created file{ "cleanUrls": false }
Now you should re-build your application and re-run you server. After these changes I managed to use the -s flag and TradingView together, without any issues.
Hope this will help someone and save you some valuable time.
yeah, I want to may thank you for your comment.
If anyone comes across this thread searching for a similar answer - make sure you have both sets of library folders in your public folder: charting_library
and datafeeds
I get the following error when running
yarn start
:I found multiple issues referring to this problem:
Tried all the suggestions, but still can't manage to make it work. Was hoping someone knows how to fix this.
Update: fixed