graphql-playground-react compilation error in `node_modules`
See original GitHub issueThis issue pertains to the following package(s):
- GraphQL Playground - Electron App
- GraphQL Playground HTML
- GraphQL Playground
- GraphQL Playground Express Middleware
- GraphQL Playground Hapi Middleware
- GraphQL Playground Koa Middleware
- GraphQL Playground Lambda Middleware
What OS and OS version are you experiencing the issue(s) on?
MacOS 10.13.6
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
1.7.20
What is the expected behavior?
When rendering the React component from the As React component example, I expect the react components to render.
What is the actual behavior?
I see compilation errors about needing appropriate webpack loaders. Typically, packages ship with compiled versions of their projects so that there would not need to be a compile step for them. It is, however, likely that I’m doing something wrong.
Here is the output from my compilation:
ERROR in ./node_modules/graphql-playground-react/lib/components/GraphQLBinApp.jsx
Module parse failed: Unexpected token (109:16)
You may need an appropriate loader to handle this file type.
| subscriptionEndpoint = getParameterByName('subscription');
| }
| return (<Wrapper>
| {this.state.loading ? null : !this.state.endpoint ||
| this.state.endpoint.length === 0 ? (<styled_1.ThemeProvider theme={styled_1.theme}>
@ ./node_modules/graphql-playground-react/lib/lib.js 13:22-59
@ ./src/pages/graphql_playground/index.js
@ multi (webpack)-dev-server/client?https://localhost:8080 webpack/hot/dev-server ./src/pages/graphql_playground
ERROR in ./node_modules/graphql-playground-react/lib/components/Playground/GraphQLEditor.jsx
Module parse failed: Unexpected token (260:16)
You may need an appropriate loader to handle this file type.
| };
| GraphQLEditor.prototype.render = function () {
| return (<EditorWrapper_1.Container setRef={this.setContainerComponent}>
| <EditorWrapper_1.default>
| <TopBar_1.default shareEnabled={this.props.shareEnabled} fixedEndpoint={this.props.fixedEndpoint}/>
@ ./node_modules/graphql-playground-react/lib/lib.js 11:22-70
@ ./src/pages/graphql_playground/index.js
@ multi (webpack)-dev-server/client?https://localhost:8080 webpack/hot/dev-server ./src/pages/graphql_playground
ERROR in ./node_modules/graphql-playground-react/lib/components/PlaygroundWrapper.jsx
Module parse failed: Unexpected token (331:43)
You may need an appropriate loader to handle this file type.
| };
| PlaygroundWrapper.prototype.render = function () {
| var title = this.props.setTitle ? (<react_helmet_1.Helmet>
| <title>{this.getTitle()}</title>
| </react_helmet_1.Helmet>) : null;
@ ./node_modules/graphql-playground-react/lib/lib.js 9:26-67
@ ./src/pages/graphql_playground/index.js
@ multi (webpack)-dev-server/client?https://localhost:8080 webpack/hot/dev-server ./src/pages/graphql_playground
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
compilation errors in `node_modules ... - GitHub
This issue pertains to the following package(s): GraphQL Playground ... compilation errors in node_modules ( getAutocompleteSuggestions.js ) #1235.
Read more >Complete guide to GraphQL Playground - LogRocket Blog
Get the most out of the developer experience with GraphQL Playground, a GraphQL IDE that helps improve development workflows.
Read more >graphql-playground-react - npm
Start using graphql-playground-react in your project by running `npm i graphql-playground-react`. There are 16 other projects in the npm ...
Read more >Migrating to Apollo Server 4 - Apollo GraphQL Docs
This plugin installs the unmaintained GraphQL Playground project as a landing page and is provided ... Apollo Server 4 supports Node.js 14.16.0 and...
Read more >graphql-playground-react | Yarn - Package Manager
graphql -playground-react. owner graphcool34.3kMIT1.7.28TS vulns 6 vulnerabilities. GraphQL IDE for better development workflows (GraphQL Subscriptions, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Getting the same issue when using graphQl-playground-react with next.js.
I added file loader to my webpack config, and now it’s compiling (still with flow errors). I’d love to see some information added to the readme about this, as it was totally unclear what I needed to do to actually get this running.