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

[Quasar] boot error: SyntaxError: missing name after . operator #154

Closed
ipalestine opened this issue Nov 24, 2023 · 2 comments · Fixed by #155
Closed

[Quasar] boot error: SyntaxError: missing name after . operator #154

ipalestine opened this issue Nov 24, 2023 · 2 comments · Fixed by #155

Comments

@ipalestine
Copy link

After add apollo to project with ext command and add it to boot section of quasar config this error ocurred:

[Quasar] boot error: SyntaxError: missing name after . operator

@darqus
Copy link

darqus commented Dec 4, 2023

confirming this behavior
the project becomes inoperable

// @vue/apollo-composable
// SyntaxError: missing name after . operator
import { useQuery, useResult, } from '@vue/apollo-composable'

@yusufkandemir
Copy link
Member

This is most likely the same problem as quasarframework/quasar#16060
These are the messages for the same error in different browsers:

SyntaxError: Unexpected string (Chrome)
SyntaxError: missing name after . operator (Firefox)
SyntaxError: Unexpected token '"'. Expected a property name after '.'. (Safari)

graphql package accesses process.env like globalThis.process.env.NODE_ENV which gets replaced to globalThis."development"/globalThis."production" during dev/build process. So, either the graphql package needs to address this, or we can work around it by converting globalThis.process.env.NODE_ENV as a whole. I will create a PR to apply this workaround.

smolinari added a commit that referenced this issue Jan 14, 2024
…ocess.env-issue

fix: make graphql package work with Vite (fix: #154)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants