Closed JamesPHoughton closed 9 months ago
Looks like this is something other projects have encountered using graphql and cross-fetch
: https://github.com/lquixada/cross-fetch/issues/120#issuecomment-1617172860
Some discussion in other projects about it being related to how the packages are linked: https://github.com/supabase/supabase-js/issues/845#issuecomment-1709307299
@JamesPHoughton thanks for the detailed report -- just chiming in to say I'm also facing this. happy to share any diagnostics that are helpful, but I see obvious bases are already covered.
As an aside, is the documentation on changing to a specific version up-to-date? Tried doing $ empirica upgrade --version "version: v1.8.5"
to roll back, but got ⠦ Upgrade empirica packages00:46:37.986 FTL empirica: failed to start error="upgrade packages: upgrade client: npm install --silent -E @empirica/core@version: v1.8.5: exit status 1"
Update: it looks like empirica upgrade --version "v1.8.5"
works, I'll submit a PR for the docs.
Would mind trying to add the following to you client/package.json and then npm i
and try again:
"overrides": {
"@empirica/core": {
"@empirica/tajriba": "1.5.2"
}
}
Thanks!
That worked great - what is it doing?
It forces a new version of tajriba I released, that polyfills fetch on the server. Unfortunately, the 2 libraries that handle browser and node cross platform support for fetch are broken in different ways, when using what they call a "ponyfill", which is where you don't overwrite the global definition of the thing you're trying to patch (here, fetch). So we're going for a full polyfill, which I'd rather not do, but I think it's fine. node-fetch is good. And I don't really have a choice at this point.
I'm releasing a new version with this fix.
This should be fixed in release 1.8.9.
Is there an existing issue for this?
What happened?
After bumping to latest version, running the admin console is fine, but switching to participant view yields a JS error, and a blank page. (Nothing is rendered at all.)
From chrome browser console:
From firefox
Which corresponds to:
From safari:
No errors serverside.
Steps To Reproduce
No response
Empirica Version
What OS are you seeing the problem on?
macOS
What browser are you seeing the problem on?
No response
Relevant log output
No response
Anything else?
No response
Code of Conduct