Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tyleralbee opened this issue Jul 21, 2024 · 3 comments
Closed

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

tyleralbee opened this issue Jul 21, 2024 · 3 comments

Comments

@tyleralbee
Copy link

tyleralbee commented Jul 21, 2024

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 [email protected]: 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": "[email protected]",
    "engines": {
        "node": ">=20"
    }
}

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@SuperchupuDev
Copy link
Contributor

SuperchupuDev commented Jul 21, 2024

caused by #1158's globbing library switch, will try to fix (although i have to say it doesn't look like this was documented behavior)

@SuperchupuDev
Copy link
Contributor

by the way, (until the fix gets released) replacing "src" with "src/**" should work as a workaround

@egoist
Copy link
Owner

egoist commented Jul 22, 2024

Fixed in https://github.com/egoist/tsup/releases/tag/v8.2.2

@egoist egoist closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants