Skip to content

Commit a97ebe5

Browse files
shadcnclaude
andauthored
fix: bundle @antfu/ni to resolve tinyexec missing module error (#10041)
* fix: bundle @antfu/ni to resolve tinyexec missing module error Fixes #10028. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: changeset Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b2cc0df commit a97ebe5

4 files changed

Lines changed: 16 additions & 8 deletions

File tree

.changeset/fix-tinyexec-missing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"shadcn": patch
3+
---
4+
5+
Bundle @antfu/ni and tinyexec to fix missing module error with npx

packages/shadcn/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
"mcp:inspect": "pnpm dlx @modelcontextprotocol/inspector node dist/index.js mcp"
8080
},
8181
"dependencies": {
82-
"@antfu/ni": "^25.0.0",
8382
"@babel/core": "^7.28.0",
8483
"@babel/parser": "^7.28.0",
8584
"@babel/plugin-transform-typescript": "^7.28.0",
@@ -116,6 +115,7 @@
116115
"zod-to-json-schema": "^3.24.6"
117116
},
118117
"devDependencies": {
118+
"@antfu/ni": "^25.0.0",
119119
"@types/babel__core": "^7.20.5",
120120
"@types/fs-extra": "^11.0.4",
121121
"@types/prompts": "^2.4.9",

packages/shadcn/tsup.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export default defineConfig({
1919
target: "esnext",
2020
outDir: "dist",
2121
treeshake: true,
22+
// Bundle @antfu/ni and its dependency tinyexec to avoid
23+
// module resolution failures with npx temporary installs.
24+
noExternal: ["@antfu/ni", "tinyexec"],
2225
onSuccess: async () => {
2326
copyFileSync("src/tailwind.css", "dist/tailwind.css")
2427
},

pnpm-lock.yaml

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)