这是indexloc提供的服务,不要输入任何密码
Skip to content

[Bug] Cannot find src - 8.2.1 breaking changes #1161

@tyleralbee

Description

@tyleralbee

My project builds just fine on version 8.2.0 but is unable to build on 8.2.1.

When running pnpm i on 8.2.1:

# after running pnpm install
packages/redacted
│└─┬ tsup 8.2.1
│  └─┬ fdir 6.1.1
│    └── ✕ unmet peer picomatch@3.x: found 4.0.2 in tsup 

When running tsup:

# after running tsup
> tsup

Cannot find src

Installing peers did not fix the issue for me; pinning my version to 8.2.0 in my package.json fixed the issue.

// package.json
"tsup": "8.2.0"

My tsconfig:

{
    "compilerOptions": {
        "rootDir": ".",
        "outDir": "dist"
    },
    "include": ["**/*.ts", ".eslintrc.cjs"]
}

My tsup.config.ts:

import { defineConfig } from "tsup";

const tsupConfig = defineConfig({
    entry: ["src"],
    format: ["esm"]
})

export default tsupConfig;

The relevant parts of my package.json:

{
    "name": "@monorepo/redacted",
    "type": "module",
    "exports": {
        "./redacted": {
            "types": "./src/redacted.ts",
            "import": "./dist/redacted.js"
        }
    },
    "scripts": {
        "build": "tsup"
    },
    "devDependencies": {
        "tsup": "8.2.1",
        "typescript": "5.5.3"
    },
    "packageManager": "pnpm@9.5.0",
    "engines": {
        "node": ">=20"
    }
}

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