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
webpack broken by ajv@6.9.0, "custom keyword definition is invalid: data.errors should be boolean" #8768
Comments
|
same here |
|
Same |
If you use yarnadd below to package.json then run if you use npm |
|
Same issue, just happened after doing a |
|
same, thanks for posting, this might be something new |
|
|
|
Quick fix, in node_modules\ajv\lib\keyword.js I commented out |
Lock the version of AJV for now, until issue is resolved webpack/webpack#8768 ajv-validator/ajv#941
|
@ivangajic yes, that does the trick for now |
|
I've created a minimal reproduction repository: https://github.com/acro5piano/webpack-issues-8768 |
|
@ivangajic, what's the line in the file? i don't found |
That's 64 and 65 |
|
@JesusViveros12 |
|
Or add this to your Then For npm users: |
Seems so simple I would love it to work, but getting same error, anything else I should look at? |
|
@tyteen4a03 Thanks, it works for me! |
|
@ivangajic , i have different code in these lines: I'll try with the @tyteen4a03 solution too |
Have you reinstalled your packages with npm install? ;p |
|
@JesusViveros12 |
|
Note that resolutions is a yarn feature and not an npm feature. From the linked ajv issue:
|
I did, didn't seem to fix it for me either. |
|
@jackturnbull Thanks - I was just about to clarify. |
|
npm
Didn't at first, but just did an no luck. I'm looking in the package-lock.json file and seeing it still has the code below, would that make a difference? New to all this.
|
|
@youngzaphod Please see updated comment for npm (or switch to Yarn) |
|
updating package-lock.json definitions worked on my end, there were many referencing 6.9.0 and I clobbered them all back to 6.8.1 as below. "ajv": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.8.1.tgz",
"integrity": "sha512-eqxCp82P+JfqL683wwsL73XmFs1eG6qjw+RD3YHx+Jll1r0jNd4dh8QG9NYAeNGA/hnZjeEDgtTskgJULbxpWQ==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
}, |
This worked with me |
|
Another option is to lockdown to 4.28.x the webpack itself |
|
To fix this error, just change: |
|
"resolutions": { with yarn install worked for me. |
|
@DarkLink363 |
|
What worked for me is to comment the line that throws the error in : node_modules\ajv\lib\keyword.js |
|
It is fixed so let's wait a little more:) |
|
Awesome |
|
if it's not working for you after the resolutions addition to your packages, delete node modules before running the install and it should work. |
|
@hiroppy The question is, when will the owner of the project be online again. I have a feeling he published right before going to bed, so it may take a few more hours at least before he's around and notices my PR :-) (and then the question is will he like the solution or not) |
it took my 2 hours... you saved me! |
Thanks, it works for me! |
When using this method it set ajv to |
As per webpack/webpack#8768 Note that you may need to nuke your node_modules folder and reinstall
|
Hey, so I'm having trouble with this using docker-compose. any tips ? |
|
Was looking in the wrong folder, thanks for the tips on quick fix. |
This worked for me. |
|
@ArchambaultP to the dockerfile |
|
Hey everyone thanks for all the quick feedback. We will reach out to AJV and see if we can tighten up the communication channels for their API and will consider pinning this dep for the future. I will lock the thread once I get off mobile (bad winter storm here right now and losing power intermittently |
|
Note that I just locked it as "resolved" not because the issue is fixed, but because we are aware of the issue and there are workarounds posted above. <3 Thanks for the patience and understanding everyone. |
|
Fixed |
|
TY @sokra was just checking on it |
Lock the version of AJV for now, until issue is resolved webpack/webpack#8768 ajv-validator/ajv#941


Bug report
What is the current behavior?
A fresh install of webpack will fail to run with the error "custom keyword definition is invalid: data.errors should be boolean" due to the latest version of ajv. See issue here ajv-validator/ajv#941 referencing many other broken projects.
If the current behavior is a bug, please provide the steps to reproduce.
Install webpack and attempt to use it.
What is the expected behavior?
I expect webpack not to fail due to unreliable, auto-updating dependencies.
Other relevant information:
webpack version: 4.28.4
Node.js version: 10.15.1
Operating System: Windows 10
Additional tools:
The text was updated successfully, but these errors were encountered: