Skip to content
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

require() of ES modules is not supported. #1961

Closed
Tracked by #2441
binary64 opened this issue May 22, 2021 · 4 comments
Closed
Tracked by #2441

require() of ES modules is not supported. #1961

binary64 opened this issue May 22, 2021 · 4 comments

Comments

@binary64
Copy link

Describe the bug

I'm getting this on my pipeline

+ npm i -g @graphql-inspector/cli graphql
...
+ graphql-inspector validate "{libs,apps}/**/*.{graphql,tsx}" hasura/schema.graphql || true
(node:383) UnhandledPromiseRejectionWarning: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/local/lib/node_modules/@graphql-inspector/cli/node_modules/log-symbols/index.js
require() of ES modules is not supported.

To Reproduce
Steps to reproduce the behavior:

Using image: node:14-buster on a bitbucket-pipelines.yml

Expected behavior

Add engines key to package and/or list minimum requirements on README

Environment:

  • OS: image: node:14-buster on Bitbucket
  • @graphql-inspector/...: I can get the rest if requested
  • graphql:
  • NodeJS:

Additional context

Was/am confused between graphql-inspector and @graphql-inspector/*

@zoripong
Copy link

I have this issue too.
Downgrading @graphql-inspector/cli to 2.5.0 fixed it for me.

@EpicDrakkar
Copy link

Same issue here

@kamilkisiela
Copy link
Owner

v2.6.1 should fix it

@binary64
Copy link
Author

Thanks, I think it helped! But now I get a secondary issue, after running the exact same commands

node:internal/modules/cjs/loader:930
  throw err;
  ^

Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants