Skip to content
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

[SDK 51][expo-web] @apollo-client fails during expo export with metro for web #28785

Closed
marklawlor opened this issue May 13, 2024 · 2 comments · Fixed by #28786
Closed

[SDK 51][expo-web] @apollo-client fails during expo export with metro for web #28785

marklawlor opened this issue May 13, 2024 · 2 comments · Fixed by #28786
Assignees
Labels
CLI Versioned Expo CLI -- `npx expo start` Issue accepted

Comments

@marklawlor
Copy link
Contributor

Regression in SDK51 where expo-web is unable to export projects that include dependencies that export __DEV__ inside a module.

@marklawlor @wollerman this happens with expo51, which didn't with expo50.
see the reproduction here: https://github.com/younes0/apollo-sdk51-bug-repro

running npx expo export --clear --platform web results in:

Web Bundling failed 11730ms node_modules/expo-router/entry.js (1197 modules)
error: node_modules/@apollo/client/utilities/globals/index.js: /projects/apollo-sdk51-bug-repro/node_modules/@apollo/client/utilities/globals/index.js: Property exported of ExportSpecifier expected node to be of a type ["Identifier","StringLiteral"] but instead got "BooleanLiteral"
λ Bundled 11807ms node_modules/expo-router/node/render.js (1093 modules)
Error: node_modules/@apollo/client/utilities/globals/index.js: /projects/apollo-sdk51-bug-repro/node_modules/@apollo/client/utilities/globals/index.js: Property exported of ExportSpecifier expected node to be of a type ["Identifier","StringLiteral"] but instead got "BooleanLiteral"
Error: node_modules/@apollo/client/utilities/globals/index.js: /projects/apollo-sdk51-bug-repro/node_modules/@apollo/client/utilities/globals/index.js: Property exported of ExportSpecifier expected node to be of a type ["Identifier","StringLiteral"] but instead got "BooleanLiteral"
    at MetroBundlerDevServer.getStaticResourcesAsync (/projects/apollo-sdk51-bug-repro/node_modules/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts:325:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at exportFromServerAsync (/projects/apollo-sdk51-bug-repro/node_modules/@expo/cli/src/export/exportStaticAsync.ts:196:66)
    at unstable_exportStaticAsync (/projects/apollo-sdk51-bug-repro/node_modules/@expo/cli/src/export/exportStaticAsync.ts:94:12)
    at exportAppAsync (/projects/apollo-sdk51-bug-repro/node_modules/@expo/cli/src/export/exportApp.ts:169:7)
    at exportAsync (/projects/apollo-sdk51-bug-repro/node_modules/@expo/cli/src/export/exportAsync.ts:18:3)

Originally posted by @younes0 in #25965 (comment)

@marklawlor marklawlor changed the title Closed [SDK 50][expo-web] @apollo-client fails during expo export with metro for web [SDK 51][expo-web] @apollo-client fails during expo export with metro for web May 13, 2024
@expo-bot expo-bot added the needs review Issue is ready to be reviewed by a maintainer label May 13, 2024
@marklawlor marklawlor added CLI Versioned Expo CLI -- `npx expo start` Issue accepted and removed needs review Issue is ready to be reviewed by a maintainer labels May 13, 2024
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@ericlyoung
Copy link

having to roll back to 50 because of this bug

EvanBacon added a commit that referenced this issue May 13, 2024
…ent. (#28786)

# Why

Fixes a regression that we temporarily fixed in SDK 50.
https://exponent-internal.slack.com/archives/C5ERY0TAR/p1715558585127549
Specifically fixes support for syntax used in `@apollo/client`.
fix #28785

# Test Plan

- Added tests that could reproduce the syntax issue from before.

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Versioned Expo CLI -- `npx expo start` Issue accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants