blitz-js / blitz-js/blitz

Blitz build error due to ajv import path

Open
#4,436 0 comments 0 reactions 0 assignees View on GitHub
kind/bug status/triage
Dominant language
TypeScript
Stars
14.1k
Forks
803
PR merge metrics
No merged PRs in 30d

Description

### 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: https://github.com/ajv-validator/ajv/issues/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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.