Build failed: Unknown keyword formatMinimum
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
It’s more like a runtime-related issue, so I didn’t create a repro.
We set up a website in https://github.com/datafuselabs/databend/tree/main/website/databend, and developers with Mac M1 failed to build this site.
Reported in https://github.com/datafuselabs/databend/issues/3283
Steps to reproduce
- Using a macbook pro M1
git clone git@github.com:datafuselabs/databend.gitcd databend/website/databendnpm run build
Expected behavior
The site built successful.
Actual behavior
[en] Creating an optimized production build...
✖ Client
Compiled with some errors in 9.84s
● Server █████████████████████████ building (64%) 1/1 entries 2234/2234 dependencies 770/770 modules 0 active
Error: Unknown keyword formatMinimum
Module build failed: Error: Unknown keyword formatMinimum
Client bundle compiled with errors therefore further build is impossible.
Your environment
- Public source code: https://github.com/datafuselabs/databend/tree/main/website/databend
- Public site URL: https://databend.vercel.app
- Docusaurus version used: 2.0.0-beta.9
- Environment name and version (e.g. Chrome 89, Node.js 16.4):, node v17.2.0, npm 7.24.2
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOS monterey 12.0.1
Reproducible demo
https://github.com/datafuselabs/databend/tree/main/website/databend
Self-service
- I’d be willing to fix this bug myself.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Angular 13 upgrade - Error: Unknown keyword formatMinimum
After the upgrade, I ran into an error when I tried to build the project. Error: Module build failed(from ./node_modules/mini ...
Read more >ajv@7.2.4 - Error: strict mode: unknown keyword
I expect the ajv keyword a unevaluatedProperties to be defined and working in ajv version 7.2.4, however I get the error message in...
Read more >@rijx/ajv - npm Package Health Analysis | Snyk
The option unknownFormats allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation ......
Read more >node_modules/ajv-keywords · master - PLMlab
If the data is not a string, the validation succeeds. The value of keyword formatMaximum ( formatMinimum ) should be a string. This...
Read more >ajv-formats - Ajv JSON schema validator
These keywords apply only to strings. If the data is not a string, the validation succeeds. The value of keywords formatMaximum / formatMinimum...
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
@zhang2014 After inspecting the error stack you posted in the original issue, I think the issue could be a version mismatch between
ajv-keywords.The error is coming from the Webpack loader
url-loader, which depends onschema-utils@3.1.1, and the latter usesajv-keywords@3.5.2. TheformatMinimumkeyword was removed from this package in v4: https://github.com/ajv-validator/ajv-keywords/releases/tag/v4.0.0. Typically, that shouldn’t be an issue, because the right version should be supplied by the package manager; however, in your case, NPM seems to be aggressively flattening the dependency tree and causes a wrong version (ajv-keywords@5.1.0) to be used instead.I was wrong when I said Yarn wasn’t the issue; Yarn was exactly the reason why I couldn’t reproduce. This incident has demonstrated why Yarn is a better package manager 😄 Please test again with Yarn and check if that works.
Hi, two of the maintainers are using Mac M1 (including me). Unfortunately I’m unable to reproduce the issue:
(I’m using Yarn because I’m having troubles connecting to the NPM registry but the package manager shouldn’t be the issue here)
Update. I’m on MacOS Big Sur, but there’s little reason why that’s the problem