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
When trying import the @shopify/graphql-testing package into a test and not having react installed in the project, it fails with the following error.
@shopify/graphql-testing
react
Perhaps this package should make react a peerDependency, and possibly state it in the documentation.
I expected that I could use this package for testing in projects where React is not used, such as a microservice project.
Cannot find module 'react' from 'node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/react/context/context.cjs' Require stack: node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/react/context/context.cjs node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/react/react.cjs node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/main.cjs node_modules/.pnpm/@shopify+graphql-testing@7.0.1/node_modules/@shopify/graphql-testing/build/cjs/graphql-controller.js node_modules/.pnpm/@shopify+graphql-testing@7.0.1/node_modules/@shopify/graphql-testing/build/cjs/index.js node_modules/.pnpm/@shopify+graphql-testing@7.0.1/node_modules/@shopify/graphql-testing/index.js <test file>.spec.ts > 1 | import { createGraphQLFactory } from '@shopify/graphql-testing'; | ^ 2 | import { webhookManager } from '.'; 3 | 4 | const createGraphQL = createGraphQLFactory({ at Resolver._throwModNotFoundError (node_modules/.pnpm/jest-resolve@29.7.0/node_modules/jest-resolve/build/resolver.js:427:11) at Object.<anonymous> (node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/react/context/context.cjs:6:13) at Object.<anonymous> (node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/react/react.cjs:6:15) at Object.<anonymous> (node_modules/.pnpm/@apollo+client@3.8.8_graphql@15.8.0/node_modules/@apollo/client/main.cjs:6:13) at Object.<anonymous> (node_modules/.pnpm/@shopify+graphql-testing@7.0.1/node_modules/@shopify/graphql-testing/build/cjs/graphql-controller.js:5:14) at Object.<anonymous> (node_modules/.pnpm/@shopify+graphql-testing@7.0.1/node_modules/@shopify/graphql-testing/build/cjs/index.js:5:25) at Object.<anonymous> (node_modules/.pnpm/@shopify+graphql-testing@7.0.1/node_modules/@shopify/graphql-testing/index.js:1:120) at Object.<anonymous> (<test file>:1:1)
What repo were you working in when this issue occurred?
A private one.
Package: <package_name>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Overview
When trying import the
@shopify/graphql-testing
package into a test and not havingreact
installed in the project, it fails with the following error.Perhaps this package should make
react
a peerDependency, and possibly state it in the documentation.I expected that I could use this package for testing in projects where React is not used, such as a microservice project.
Consuming repo
A private one.
Scope
@shopify/graphql-testing
Package: <package_name>
label.The text was updated successfully, but these errors were encountered: