charting-library-examples: react-javascript example does not work in production.
When I run yarn build followed by serve -s build to start the example in production mode, the example does not work. Here is the error that shows up:

There is no error when simply running yarn start.
The error seems to be similar to #1
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (13 by maintainers)
You even can try to do the following:
cd buildserve(without-s build)And this works fine.
Thanks you, @mogenshoj! I’ve created issue in the charting_library repo for this - https://github.com/tradingview/charting_library/issues/3750.
Some insights for anyone having this issue.
The problems comes from the iframe not loading the correct html file. The
widgetReadyfunction is defined in the iframe, if the iframe loads a 404 this error will show up.Would be nice to have something like:
It would limit the number of support requests and make the error more understandable.
To solve: Inspect the iframe and verify that the
srcpoints to a file that exists. Possibly set thelibrary_pathconfig attribute to point the the correct folder containing the library files, if you’re not using the standard configuration.When i run serve (without -s) command, Routing client has a problem. It shows “the requested path route could be not found”. Anyone has the same issue ?
@timocov thanks. It’s works for me.
Or even
serve buildworks well too (without-s- I do not know why somebody decide that we need to add this flag).