We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using CM6 in my project and want to add graphQL.
I am trying to import
<script lang="ts"> import { graphql } from 'cm6-graphql'; </script>
And have a lib error: "Cannot use import statement outside a module"
~/node_modules/cm6-graphql/dist/index.js:1 import { getTokenAtPosition, getTypeInfo, getAutocompleteSuggestions, getDiagnostics } from 'graphql-language-service'; ^^^^^^
At first I've tried it in prod project, then created PoC app. I am expecting this import to work.
pnpm create svelte@latest codemirror-graphql
pnpm run dev
cm6-graphql
svelte
System
No response
The text was updated successfully, but these errors were encountered:
Adding "type": "module" to the package's package.json fixes the issue for me.
"type": "module"
This can be done easily by patching the dependency with Yarn: yarn patch cm6-graphql
yarn patch cm6-graphql
See e.g https://github.com/graphinx/templates/blob/b5946fd755cb5ad51d492b95eb9a8f0e34233c25/default/.yarn/patches/cm6-graphql-npm-0.0.15-fe23fd2b32.patch#L9
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
Current Behavior
I am using CM6 in my project and want to add graphQL.
I am trying to import
And have a lib error: "Cannot use import statement outside a module"
~/node_modules/cm6-graphql/dist/index.js:1
import { getTokenAtPosition, getTypeInfo, getAutocompleteSuggestions, getDiagnostics } from 'graphql-language-service';
^^^^^^
Expected Behavior
At first I've tried it in prod project, then created PoC app. I am expecting this import to work.
Steps To Reproduce
pnpm create svelte@latest codemirror-graphql
pnpm run dev
Environment
cm6-graphql
Version: 0.0.14svelte
Version: 4.2.7System
Anything else?
No response
The text was updated successfully, but these errors were encountered: