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

Shim support for Windows is broken #879

Closed
hiimjustin000 opened this issue Apr 9, 2023 · 1 comment · Fixed by #891
Closed

Shim support for Windows is broken #879

hiimjustin000 opened this issue Apr 9, 2023 · 1 comment · Fixed by #891
Labels

Comments

@hiimjustin000
Copy link

hiimjustin000 commented Apr 9, 2023

When I try to add shims: true to my tsup config, it always results in an error.

For example, this is the output:

CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v6.7.0
CLI Using tsup config: C:\Users\justi\OneDrive\Desktop\CodeProjects\mock-zlib\tsup.config.json
CLI Target: es2021
CLI Cleaning output folder
ESM Build start
CJS Build start
X [ERROR] The injected path "C:\\Users\\justi\\AppData\\Local\\pnpm\\global\\5\\.pnpm\\tsup@6.7.0_ts-node@10.9.1_typescript@5.0.2\\node_modules\\tsup\\assets\\cjs_shims.js" cannot be marked as external

X [ERROR] The injected path "C:\\Users\\justi\\AppData\\Local\\pnpm\\global\\5\\.pnpm\\tsup@6.7.0_ts-node@10.9.1_typescript@5.0.2\\node_modules\\tsup\\assets\\esm_shims.js" cannot be marked as external

ESM Build failed
Error: Build failed with 1 error:
error: The injected path "C:\\Users\\justi\\AppData\\Local\\pnpm\\global\\5\\.pnpm\\tsup@6.7.0_ts-node@10.9.1_typescript@5.0.2\\node_modules\\tsup\\assets\\esm_shims.js" cannot be marked as external 
    at failureErrorWithLog (C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:1636:15)
    at C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:1048:25
    at runOnEndCallbacks (C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:1471:45)
    at buildResponseToResult (C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:1046:7)
    at C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:1075:16
    at responseCallbacks.<computed> (C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:697:9)
    at handleIncomingPacket (C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:752:9)
    at Socket.readFromStdout (C:\Users\justi\AppData\Local\pnpm\global\5\.pnpm\esbuild@0.17.13\node_modules\esbuild\lib\main.js:673:7)
    at Socket.emit (node:events:512:28)
    at addChunk (node:internal/streams/readable:324:12)
CJS Build failed
DTS Build start
DTS ⚡️ Build success in 1027ms
DTS dist\index.d.ts 192.00 B

I have tried searching for solutions, even modifying the NON_NODE_MODULE_RE regular expression (As suggested in #844), but to no avail. Is there any way to fix this?

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
@github-actions
Copy link

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant