Error: Cannot find module 'ajv/dist/core'
See original GitHub issueI’m getting Error: Cannot find module 'ajv/dist/core' when trying to require require('api'). It’s coming from the dependancy ajv-draft-04@1.0.0.
└─┬ api@4.2.0
└─┬ @readme/openapi-parser@2.0.3
└── ajv-draft-04@1.0.0
api version 4.2.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Error: Cannot find module 'ajv/dist/compile/codegen' #875
When trying to run webpack build a project with min-css-extract-plugin, it failed. ... ajv-keywords@5.1.0 requires a peer of ajv@^8.8.2 but none ...
Read more >Quasar Error: Cannot find module 'ajv/dist/compile/codegen'
I just hit the same error several times recently. In my case the error was based on ajv-keywords and ajv-formats plugin incompatibility with ......
Read more >ajv-dist - npm
Start using ajv-dist in your project by running `npm i ajv-dist`. There are 4 other projects in the npm registry using ajv-dist.
Read more >Cannot find module 'ajv/dist/core' #264 - bytemeta
Hello! It seems that there is a problem with a dependency of ajv, when using openapi-glue v2.6.1 it throws an error whenever I...
Read more >Error: Cannot find module 'ajv/dist/compile/context' - Issuehunt
I'm getting the error "Error: Cannot find module 'ajv/dist/compile/context'" Using electron-store ^7.0.0 and up. Downgraded to 6.0.1 and everything worked ...
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
Ok I switched to the same versions of node and npm as you. node v14.18.2 and npm 7.24.2 using nvm. But still had the issue
You were right it was the wrong version of AJV.
I ran
$ npm ls ajvand got:so I ran
npm install ajv@8.10.0Now it’s fixed . Thank you!
Also do you have AJV installed anywhere else with your codebase? Could be that a different version of AJV or
ajv-draft-04are trying to get loaded and they don’t have thisdist/corefile.