Solvedajv missing file

In the last v6.6.0 release, there is a missing file:

Error: Cannot find module 'ajv/lib/compile/equal'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/travis/build/fastify/fastify/node_modules/table/dist/validateConfig.js:2:13)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Module.replacementCompile (/home/travis/build/fastify/fastify/node_modules/nyc/node_modules/append-transform/index.js:58:13)
    at Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Object.<anonymous> (/home/travis/build/fastify/fastify/node_modules/nyc/node_modules/append-transform/index.js:62:4)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/travis/build/fastify/fastify/node_modules/table/src/makeConfig.js:3:1)
    at Module._compile (internal/modules/cjs/loader.js:722:30)

and fastify/fastify#1281.

24 Answers

✔️Accepted Answer

Other solution is to add a manual resolution in the package.json:

  "resolutions": {
    "ajv": "6.5.5"

then you can use both yarn or npm

Other Answers:

I will revert, it’ll go out in the next major version. Give me an hour - just landed :)

So it appears that several libraries depended on an internal file that was not public (I think) and that became one-line wrapper around fast-deep-equal long time ago... Who would have thought :)

@mcollina @gajus could you please replace require(“ajv/lib/compile/equal”) with require(“fast-deep-equal”)? I won’t be able to revert for several hours I am afraid.

Yes, that’s why I probably kept it at the time... it’s published

Related Issues:

ajv npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0
This is fixed by adding ajv in your project The problem is almost certainly with npm itself. ...
ajv Custom Error Messages
👍 This feature would be very interesting to me too bad it isn't handled in ajv.. As amcdnl said ...
ajv missing file
Other solution is to add a manual resolution in the package.json: then you can use both yarn or npm ...
ajv NPM: 6.9.0 AJV Commit causing failure to execute node_modules (multiple dependencies affected i.e. ESLint and WebPack Loaders)
Add to your package.json will create a work around (I am using yarn don't know if it will work for n...
ajv Custom coerce types/functions
Maybe example would help in docs but the idea here is explained in docs you mention - the validation...
fastapi WARNING: Unsupported upgrade request.
This error is not part of the FastAPI codebase When attempting to run this (using UviCorn) it starts...
fastapi [QUESTION] How to bridge Pydantic models with SQLAlchemy?
I just finished integrating Pydantic ORM mode into FastAPI it is released as version 0.30.0 🎉 The n...
fastapi [QUESTION] How to send 204 response?
Instead of returning None and instead of injecting the response just return a newly created response...
pydantic Automatic conversion from float to int?
You got a misfeature there buddy Automatic conversion (by default!) from float to int is a terrible ...
fastapi OpenAPI UI not working properly when using automatic swagger-ui CDN (swagger-ui-3.30.1)
Thanks for reporting it and for all the discussion here everyone! 🚀 ☕ Indeed it's a bug in Swagger ...
react jsonschema form Should we move to Bootstrap v4?
IMO we should get rid of Bootstrap to be fully agnostic Maybe we can still support frameworks by cre...
fastapi [QUESTION] Is this the correct way to save an uploaded file ?
@classywhetten FastAPI has almost no custom logic related to UploadFile -- most of it is coming from...
fastapi [QUESTION] Storing object instances in the app context
@ebarlas you're 100% right Description In Flask ...
pydantic How to have an “optional” field but if present required to conform to non None value?
This is irking me at the moment Passing in a field as None is fundamentally different from not passi...
fastapi [QUESTION] aiohttp integration best practice
That is one way if you want create a new session for every request You can also use a singleton appr...
json schema spec v6 annotation: named enumerations
My first reaction was that's a cumbersome mess and then I wrote it out and now I agree with you :-) ...
pydantic Class attributes starting with underscore do not support assignment
Hello there I use pydantic in FastAPI as well and I use mongodb as database Bug For bugs/questions: ...
fastapi logs with FastAPI and Uvicorn
Doing : is exactly what I was looking for ! Thank you dbanty. Hello Thanks for FastAPI easy to use i...
pydantic mypy: invalid type comment or annotation
The above is not quite right as well because the first parameter to Field is the default value In th...
pydantic [Feature Request] Provide a discriminated union type (OpenAPI 3)
So Usage would be something like Feature Request Pydantic currently has a decent support for union t...
fastapi [QUESTION] Client Credentials Flow openAPI UI
I think I found the solution for others looking to implement the code - tiangolo has already enabled...
fastapi FastAPI 0.65.2 POST request fails with "value is not a valid dict" when using the Requests library; 0.65.1 works (with a caveat)
Can confirm this still happens! We solved it by adding a -H Content-Type: application/json to the cu...
fastapi [QUESTION] Using pydantic models for GET request query params? Currently not possible, have to use dataclasses or normal classes.
@LasseGravesen You would do it like this: Check the docs here:
jsonschema Package version mechanism incompatible with AWS Lambda
@Julian Perhaps a blurb can be added to the docs related to deploying this library using Serverless?...
react jsonschema form Validate onBlur?
Why was this closed? This should be kept open and a prop should be added to the <Form> so that this ...
fastapi [QUESTION] about threads issue with fastapi.
Hello Hi I have a question about the threads issue with fastapi ...
pydantic add exclude to Config
Hi Folks Thank you very much for supporting the config model exclude feature in 1.9.! This is going ...
fastapi [FEATURE] support for rate-limit
I've taken a stab at adapting flask-limiter to starlette and FastAPI Is your feature request related...
fastapi [QUESTION] How can I serve static files (html, js) easily?
Hi in case a solution is still needed though the issue is closed Description How can I serve static ...
fastapi Using UploadFile and Pydantic model in one request
Oups sorry I forgot I made custom validator to transform str to json for Model: ...
fastapi How can I pass the configuration in the app?
Is the example I posted above not clear enough? Without going into all the nuances of everything my ...
fastapi [BUG] openapi.json fails to be generated for nested models
oups sorry I think your mistake is putting response_model=SimilarProducts in the wrong spot it's in ...
react jsonschema form Allow the insertion of errors from outside JSONSchema validation
As an alternative solution It's great to be able to define a regex to validate an input however that...
fastapi Debug Logging (Maybe just a n00b issue)
ok so basically I'm using this in a applog package you use it wherever your entrypint is this way sh...
fastapi [QUESTION] How ot handle generic text.plain POST requests
@CockyAmoeba tl;dr: Body(...) means a body parameter that is required The first argument to Body For...
fastapi [QUESTION] Use UploadFile in Pydantic model
Thanks a lot for your helpful comment So I guess I'd have to explicitly separate the file from the J...
fastapi [BUG] Use third party class as property in pydantic schema
I'm using the solution proposed by @tiangolo up above just I preferred doing this: this way I can ei...
ngx formly Is it somehow possible to eliminate <formly-field>?
The new behavior will act like <router-outlet></router-outlet> the content will be rendered right af...
pydantic Pydantic equivalent of Marshmallow Context-aware serialization
I found this working and clear solution for me :) Models should inherit this modified BaseModel: In ...
ngx formly how-to use ngx-formly with ngx-translate
You can use one of the following methods: expressionProperties
fastapi [FEATURE] Inheritance and Polymorphism support
I think real inheritance and polymorphism support would be very useful Actually ...
pydantic Re-use validators?
The issue was closed by #941 but allow_reuse seems not to have been documented yet If anyone is inte...
fastapi [FEATURE] msgpack response if client asks for application/x-msgpack
@sandys this is kind of a hacky integration but except from the direct mspack packing / unpacking pa...
vee validate "Unexpected token export" when importing validation rules with Jest
Same as @zadigus above Versions vee-validate: 3.0.4 vue: 2.6.10 Describe the bug I've seen that this...
validator.js Why I can't configure isAlpha or isAlphanumeric to also include spaces?
i subscribe to the isAlpha(str { allow_spaces: true }) idea What's the reason for not being able to ...
vee validate Vee-Validate locale change from EN to NL not working
It works for me on version ^2.1.0-beta.6 Versions: VueJs: 2.1.10 Vee-Validate: 2.0.0-beta.25 Descrip...
vee validate Reset form validation
Check the available methods on the errors bag object you can use clear or remove to remove any error...
express validator Schema with isIn validation
Try options: [['one' 'two' 'zero']] The options array is for passing each param Since isIn() expects...
vee validate VeeValidate v3.0 🚀
@victor-ponamariov > my workaround to implement it: Regex from Zemljoradnik VeeValidate 3.0 This is ...
vee validate Clear errors after form submition
Hey I was having issues with clearing form inputs and resetting the errors much like a few here ...