graphql-voyager
graphql-voyager copied to clipboard
Uncaught SyntaxError: Unexpected token <
This error occurs only in production - in dev it works fine:
Some info:
- Windows 10 (dev)
- Ubuntu 16.04.5 (prod)
- Chrome 69.0.3497.100
- graphql-voyager 1.0.0-rc.25
- create-react-app v2
- my project: https://github.com/FNSKtZH/ae2
- worker file: https://github.com/FNSKtZH/ae2/blob/master/public/voyager.worker.js
- the component itself: https://github.com/FNSKtZH/ae2/blob/master/src/components/DataGraph/index.js
Seems similar to https://github.com/APIs-guru/graphql-voyager/issues/44. Maybe the issue is create-react-app in v2?
I'm getting this error in both dev and prod.
@barbalex Did you resolve this? I'm facing the same issue with rc.26
@stevenmckinnon no, I gave up
@barbalex I managed to get past it this morning by adding this to my webpack:
new CopyWebpackPlugin([ { from: './node_modules/graphql-voyager/dist/voyager.worker.js' } ])
@stevenmckinnon @barbalex @JHibbard Sorry for the silence.
Currently, voyager.worker.js
is the most problematic part of integrating voyager into 3rd-party apps/sites.
So we working on bundling everything into a single ~600kb JS file.
ATM, it's our biggest priority for this project and the only blocker for 1.0.0
release.
We will try to finish this project in the next few weeks.
Hi @IvanGoncharov I have the same issue using when trying to integrate this component in our application using the version 1.0.0-rc.28. Appears the error Uncaught SyntaxError: Unexpected token '<' and stuck with Transmitting. Is need to wait for version 1.0.0 for this to be solved ? Many thanks
Hi! I am using ^1.0.0-rc.31 version but I have the same issue. Do you have any updates on this? Thanks!
Same issue here with 1.0.0-rc.31
. Is this project still maintained?
Looks like this issue has been open for about 2 years now.
I'm using graphql-voyager 1.0.0-rc.31
, I tried create-react-app v4 and then webpack 4, but I still get Uncaught Syntax error
, seems like voyager.worker.js
is not rendering. Any updates on this?
I released v1.0.0
, which has workers bundled in.
If you still experience a similar issue after v1.0.0
, please feel free to open a new issue.