-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.4.0-rc.17+snowpack/esbuild failing with Class constructor Observable cannot be invoked without 'new' #8467
Comments
@sebastienbarre Please try |
@benjamn thanks for the hard work guys, this fixes the reproduction repo, and my own app. |
Based on my past experiments with Snowpack, I think this might also be the final puzzle piece that allows Snowpack apps (in general) to use |
@benjamn unfortunately I had to revert to 3.3. GraphQL giveth and |
@sebastienbarre I submitted an issue recently about "Missing cache result fields": #8442. Maybe your problem is similar to what I was seeing? From the response on my issue, it seems like it's intentionally noisy and these warnings don't necessarily mean that something is incorrect. |
@dylanwulf thanks! Let me head to that thread. |
Intended outcome:
Trying to run any app using Apollo Client 3.4.0-rc.17 and snowpack (which uses esbuild under the hood if I'm not mistaken).
Actual outcome:
Once built, my app fails right away, with the console outputting:
How to reproduce the issue:
Unfortunately, I cannot reproduce it from your Apollo Client Issue Reproduction repo, https://github.com/apollographql/react-apollo-error-template, which uses Create React App.
However I can reproduce it by taking the exact same example code of yours and plugging it into the official, Snowpack minimal template (app-template-mininal).
Here is my repo:
https://github.com/sebastienbarre-forks/react-apollo-error-template-snowpack
to reproduce, clone and:
head to the Google chrome console for the error message.
Replace 3.4.0-rc.17 with the current, official 3.3 and the problem goes away.
Note that the codesandbox will not fail -- this works in development mode, but fails once built.
https://codesandbox.io/s/github/sebastienbarre-forks/react-apollo-error-template-snowpack?file=/README.md
If I may invite snowpack and esbuild extraordinaire @FredKSchott and @evanw, they might know what's going on?
Thank you all.
Versions
Additional context
@benjamn added yesterday:
The text was updated successfully, but these errors were encountered: