You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
Make sure to fork this template and run yarn generate in the terminal.
Please make sure the GraphQL Tools package versions under package.json matches yours.
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
When attempting to run a project that uses @graphql-tools/import, a SyntaxError is thrown indicating that the process module does not provide an export named cwd. This error occurs when importing the cwd function from the process module.
To Reproduce Steps to reproduce the behavior:
Steps to reproduce the behavior:
Set up a project using @graphql-tools/import.
Use Node.js v20.11.1. or v22.2.0
Attempt to run the project.
Observe the following error:
file:/node_modules/.pnpm/@graphql-tools+import@7.0.1_graphql@16.8.1/node_modules/@graphql-tools/import/esm/index.js:3
import { cwd as cwdFactory } from 'process';
^^^
SyntaxError: The requested module 'process' does not provide an export named 'cwd'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Expected behavior
The project should run without errors, correctly importing and using the cwd function from the process module.
Environment:
OS: Mac (Sonoma 14.5)
@graphql-tools/import: 7.0.1
NodeJS: v20.11.1
Additional context
It seems like the ESM implementation in Node.js does not support named exports from the process module as expected by @graphql-tools/import. This issue might require changes in how the process module is imported or an update to the @graphql-tools/import package to support the latest Node.js versions.
Thank you for looking into this issue!
The text was updated successfully, but these errors were encountered:
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
When attempting to run a project that uses
@graphql-tools/import
, aSyntaxError
is thrown indicating that theprocess
module does not provide an export namedcwd
. This error occurs when importing thecwd
function from theprocess
module.To Reproduce Steps to reproduce the behavior:
Steps to reproduce the behavior:
Set up a project using @graphql-tools/import.
Use Node.js v20.11.1. or v22.2.0
Attempt to run the project.
Observe the following error:
Expected behavior
The project should run without errors, correctly importing and using the cwd function from the process module.
Environment:
@graphql-tools/import: 7.0.1
NodeJS: v20.11.1
Additional context
It seems like the ESM implementation in Node.js does not support named exports from the
process
module as expected by@graphql-tools/import.
This issue might require changes in how the process module is imported or an update to the@graphql-tools/import
package to support the latest Node.js versions.Thank you for looking into this issue!
The text was updated successfully, but these errors were encountered: