orval: Problem with ajv package since upgrading to orval 6.6.1
During the npm install
execution I’ve got these notifications:
npm WARN @stoplight/better-ajv-errors@1.0.1 requires a peer of ajv@>=8 but none is installed. You must install peer dependencies
yourself.
npm WARN ajv-errors@3.0.0 requires a peer of ajv@^8.0.1 but none is installed. You must install peer dependencies yourself.
Execution of npx orval
command fails with an error:
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'ajv/dist/compile/codegen'
Installing the ajv
package didn’t fix the situation. I just got another error:
Error compiling schema, function code: <LOTS_OF_CODE_HERE>
throw e;
^
SyntaxError: Unexpected token ':'
at new Function (<anonymous>)
at Ajv.compileSchema (node_modules\@stoplight\spectral-core\node_modules\ajv\dist\compile\index.js:89:30)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 18 (14 by maintainers)
Commits related to this issue
- fix(deps): ibm validator fixes issue #326 — committed to melloware/orval by melloware 2 years ago
- fix(deps): ibm validator fixes issue #326 (#327) — committed to anymaniax/orval by melloware 2 years ago
JFYI: running
npm i -D ajv && npm dedupe
fixes the problemIn your project or just trying to compile Orval ? Orval uses
yarn
notnpm
.However I am using Orval 6.6.1 in my
npm
project without issue?