-
Notifications
You must be signed in to change notification settings - Fork 105
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
Getting ERR_UNSUPPORTED_DIR_IMPORT when generating #402
Comments
As a temporary workaround, i added a file called import * as fs from 'fs';
import * as path from 'path';
// See https://github.com/graphql-editor/graphql-zeus/issues/402
const filePath = path.resolve('node_modules/config-maker/lib/utils/AwfulAutoCompletePrompt.js');
const fileContent = fs.readFileSync(filePath, 'utf8');
const fixedContent = 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'); and edited my {
"scripts": {
"postinstall": "ts-node --require tsconfig-paths/register --require reflect-metadata src/scripts/postinstall.ts",
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: