Skip to content

Blitz build error due to ajv import path #4436

@lksnmnn

Description

@lksnmnn

What is the problem?

I am getting the following error when trying to build the latest blitz version (NextJs 15.3.2, Blitz 2.2.2) with npm.

This issue describes this: ajv-validator/ajv#2443
Also manually installing the dependency worked.

Paste all your error logs here:

Error: Cannot find module 'ajv/dist/compile/codegen'

Paste all relevant code snippets here:

PASTE_HERE (leave the ``` marks)

What are detailed steps to reproduce this?

  1. blitz build

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.34 (global)
Blitz version: 2.2.2 (local)
macOS | darwin-x64 | Node: v22.15.0


 Package manager: npm

  System:
    OS: macOS 15.4.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 4.83 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.15.0 - ~/.nvm/versions/node/v22.15.0/bin/node
    Yarn: Not Found
    npm: 10.9.2 - ~/.nvm/versions/node/v22.15.0/bin/npm
  npmPackages:
    @blitzjs/auth: 2.2.2 => 2.2.2 
    @blitzjs/next: 2.2.2 => 2.2.2 
    @blitzjs/rpc: 2.2.2 => 2.2.2 
    @prisma/client: ^6.7.0 => 6.7.0 
    blitz: 2.2.2 => 2.2.2 
    next: 15.3.2 => 15.3.2 
    prisma: ^6.7.0 => 6.7.0 
    react: 19.1.0 => 19.1.0 
    react-dom: 19.1.0 => 19.1.0 
    typescript: ^5.8.3 => 5.8.3

Please include below any other applicable logs and screenshots that show your problem:

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions