graphql-inspector
graphql-inspector copied to clipboard
require() of ES modules is not supported.
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/*
I have this issue too. Downgrading @graphql-inspector/cli to 2.5.0 fixed it for me.
Same issue here
v2.6.1
should fix it
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'