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
Hi, on all of my machines, when i run zeus src/backend/prisma/generated/schema.graphql src/backend/prisma/generated/zeus --typescript --apollo, i get the following error (<repo_path> is a placeholder for the actual pwd):
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '<repo_path>/node_modules/rxjs/operators' is not supported resolving ES modules imported from <repo_path>/node_modules/config-maker/lib/utils/AwfulAutoCompletePrompt.js
Did you mean to import rxjs/operators/index.js?
at finalizeResolution (node:internal/modules/esm/resolve:249:11)
at moduleResolve (node:internal/modules/esm/resolve:908:10)
at defaultResolve (node:internal/modules/esm/resolve:1121:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file://<repo_path>/node_modules/rxjs/operators'
}
it can be fixed, if i manually edit AwfulAutoCompletePrompt.js, line 11:
-import { takeWhile } from 'rxjs/operators';+import { takeWhile } from 'rxjs/operators/index.js';
However the error always reappears when i install another package with yarn add.
The text was updated successfully, but these errors were encountered:
As a temporary workaround, i added a file called postinstall.ts to src/scripts:
import*asfsfrom'fs';import*aspathfrom'path';// See https://github.com/graphql-editor/graphql-zeus/issues/402constfilePath=path.resolve('node_modules/config-maker/lib/utils/AwfulAutoCompletePrompt.js');constfileContent=fs.readFileSync(filePath,'utf8');constfixedContent=fileContent.replace("import { takeWhile } from 'rxjs/operators';","import { takeWhile } from 'rxjs/operators/index.js';");fs.writeFileSync(filePath,fixedContent,'utf8');console.log('Fixed rxjs import in AwfulAutoCompletePrompt.js');
Hi, on all of my machines, when i run
zeus src/backend/prisma/generated/schema.graphql src/backend/prisma/generated/zeus --typescript --apollo
, i get the following error (<repo_path> is a placeholder for the actual pwd):it can be fixed, if i manually edit
AwfulAutoCompletePrompt.js
, line 11:However the error always reappears when i install another package with
yarn add
.The text was updated successfully, but these errors were encountered: