Next.js Discord

Discord Forum

``tsup: command not found`` deploying to vercel

Unanswered
Southern rough shrimp posted this in #help-forum
Open in Discord
Southern rough shrimpOP
Hi, I've got a package in my monorepo using tsup to build some typescript into dist/index.js. This is what my package.json looks like:

{
  "name": "@repo/shared-schemas",
  "version": "1.0.0",
  "description": "",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "type": "module",
  "scripts": {
    "build": "tsup",
    "clean": "rimraf dist",
    "dev": "tsup --watch ./src",
    "lint": "eslint .",
    "types:check": "tsc --noEmit"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@repo/typescript-config": "workspace:*",
    "tsup": "^8.3.6",
    "typescript": "^5.5.4"
  },
  "exports": {
    ".": "./dist/index.js"
  },
  "files": [
    "dist/*"
  ]
}


running pnpm run build locally works perfectly fine, however deploying to vercel it can't find the devDependency tsup, which is used in the build step. Any ideas? Thanks

0 Replies