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

gql loader not resolving and breaking the CLI #311

Closed
1 of 5 tasks
thescientist13 opened this issue Mar 27, 2020 · 0 comments
Closed
1 of 5 tasks

gql loader not resolving and breaking the CLI #311

thescientist13 opened this issue Mar 27, 2020 · 0 comments
Assignees
Labels
bug Something isn't working CLI Content as Data P0 Critical issue that should get addressed ASAP v0.5.0 Data w/ GraphQL
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

After publishing 0.5.0-alpha1 as part of #284 , and running either yarn build or npm build, there is a webpack error showing about not being able to process GraphQL files.

$ npm run build

> [email protected] build /Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started
> greenwood build

-------------------------------------------------------
Welcome to Greenwood ♻️
-------------------------------------------------------
Reading project config
Initializing project workspace contexts
Generating graph of workspace files...
Scaffolding out project files...
Generate pages from templates...
Writing imports for md...
Writing Lit routes...
setup index page and html
Scaffolding complete.
Building project for production.
Building SPA from compilation...
./node_modules/@greenwood/cli/src/data/queries/config.gql 1:6
Module parse failed: Unexpected token (1:6)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> query {
|   config {
|   	devServer {
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `greenwood build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/owenbuckley/.npm/_logs/2020-03-27T01_02_50_534Z-debug.log

Details

This is likely due to our webpack loader configuration

      }, {
        test: /\.(graphql|gql)$/,
        exclude: /node_modules/,
        loader: 'graphql-tag/loader'
      }]

The exclude rule is actually excluding our own code. I think we should just remove because this will likely block any other dependencies.

Also, we don't block node_modules in any other loader configuration. 🤷‍♂

@thescientist13 thescientist13 added bug Something isn't working P0 Critical issue that should get addressed ASAP CLI labels Mar 27, 2020
@thescientist13 thescientist13 added this to the MVP milestone Mar 27, 2020
@thescientist13 thescientist13 self-assigned this Mar 27, 2020
@thescientist13 thescientist13 mentioned this issue Mar 28, 2020
13 tasks
@thescientist13 thescientist13 added the v0.5.0 Data w/ GraphQL label Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI Content as Data P0 Critical issue that should get addressed ASAP v0.5.0 Data w/ GraphQL
Projects
None yet
Development

No branches or pull requests

1 participant