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

Error: custom keyword definition is invalid: data.errors should be boolean #11678

Closed
dayhaysoos opened this issue Feb 10, 2019 · 2 comments
Closed
Labels
type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@dayhaysoos
Copy link

Description

Trying to build a restaurant menu theme, I kept getting this error:

Error: custom keyword definition is invalid: data.errors should be boolean

I went into node_modules/ajv/lib/keyword.js (where the error pointed me to) and manually did this:

  if (definition) {
    definition.errors = false
...

The original value was a string when it was expecting a boolean. The theme seems to work just fine now. I just wanted to bring this to someone's attention.

Steps to reproduce

Pretty sure if you just clone my repo and try running:

yarn workspace site develop

You'll see the error

https://github.com/ndejesus1227/gatsby-theme-restaurant-website

Expected result

I should just be able to see the server start and the initial page which would say "Waddup, yo"

Actual result

Get this error:

Error: custom keyword definition is invalid: data.errors should be boolean

For some reason data.errors has a string "full".

What happened.

Environment

  System:
    OS: macOS 10.14.2
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.5.0 - ~/.nvm/versions/node/v10.5.0/bin/node
    Yarn: 1.10.1 - ~/.nvm/versions/node/v10.5.0/bin/yarn
    npm: 6.7.0 - ~/.nvm/versions/node/v10.5.0/bin/npm
  Languages:
    Python: 2.7.10 - /usr/bin/python
  Browsers:
    Chrome: 71.0.3578.98
    Safari: 12.0.2
  npmGlobalPackages:
    gatsby-cli: 2.4.9

Hopefully this is helpful.

@pieh
Copy link
Contributor

pieh commented Feb 11, 2019

Hey, there was upstream bug that was fixed, but your lock file, locks you to buggy version of ajv package:

{
  "private": true,
  "name": "gatsby-theme-restaurant",
  "version": "0.1.0",
  "workspaces": [
    "site",
    "packages/*"
  ],
  "resolutions": {
    "ajv": "^6.9.1"
  }
}

I definitely reproduced this locally, and resolutions trick fixed it - let us know if it works for you.

@pieh pieh added status: awaiting author response Additional information has been requested from the author type: upstream Issues outside of Gatsby's control, caused by dependencies labels Feb 11, 2019
@dayhaysoos
Copy link
Author

@pieh That fixed it! I used your resolutions method, removed node_modules and ran yarn install. Thank you!

@pieh pieh removed the status: awaiting author response Additional information has been requested from the author label Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
Development

No branches or pull requests

2 participants