graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.77k stars 734 forks source link

Critical dependency: the request of a dependency is an expression #812

Open simPod opened 6 years ago

simPod commented 6 years ago

This issue pertains to the following package(s):

What OS and OS version are you experiencing the issue(s) on?

macos latest

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.7.2

What is the expected behavior?

No warnings when building

What is the actual behavior?

7396:15-64 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/graphql-playground-react/node_modules/prettier/standalone.js
 @ ./node_modules/graphql-playground-react/lib/utils.js
 @ ./node_modules/graphql-playground-react/lib/state/sessions/fetchingSagas.js
 @ ./node_modules/graphql-playground-react/lib/components/Playground.js
 @ ./node_modules/graphql-playground-react/lib/components/PlaygroundWrapper.js
 @ ./node_modules/graphql-playground-react/lib/lib.js

What steps may we take to reproduce the behavior?

const GraphQLPlayground: React.SFC<any> = ({ endpoint, subscriptionEndpoint }) => (
  <Provider store={store}>
    <Playground endpoint={endpoint} subscriptionEndpoint={subscriptionEndpoint} />
  </Provider>
);

Please provide a gif or image of the issue for a quicker response/fix. image

voor commented 6 years ago

As a temporary workaround to this issue in your CI environment, you can hack your way around this issue:

CI='' npm run build

This will unset the CI variable for the build command and allow warnings to be ignored.

arush commented 6 years ago

same issue here

arush commented 6 years ago

@voor is there any other way around this? What is the proper fix? the CI hack breaks other things that we depend on

simPod commented 6 years ago

Personally, I'm not into JS much so waiting for a fix from maintainers. Hacking CI is a no go for me.

voor commented 6 years ago

@arush You can eject your CRA and modify based on the responses in this thread: https://github.com/prettier/prettier/issues/4959