Skip to content

[docs] Incorrect upgrade command in v4 migration guide #5019

@benhovinga

Description

@benhovinga

Ref: http://zod.dev/v4/changelog

The upgrade command listed in the Migration Guide doesn't work.

$ npm upgrade zod@^4.0.0
npm error code EUPDATEARGS
npm error Update arguments must only contain package names, eg:
npm error     npm update zod
npm error A complete log of this run can be found in:

The npm update command only works between minor and patch versions.

Since we are going to a new major version we need to use npm install instead.

npm install zod@^4.0.0

Nathan Sebhastian made an excellent guide for updating npm packages: https://sebhastian.com/npm-update-all-packages/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions