build issue with tsup
Closed this issue · 2 comments
nikoPLP commented
plugin-split-editing % pnpm run build
> @milkdown-lab/plugin-split-editing@1.3.0 build /[redacted]/milkdown-lab/packages/plugin-split-editing
> tsup
Error [ERR_REQUIRE_ESM]: require() of ES Module /[redacted]/milkdown-lab/node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js from /[redacted]/milkdown-lab/node_modules/.pnpm/tsup@8.2.4_typescript@5.5.4/node_modules/tsup/dist/index.js not supported.
Instead change the require of /[redacted]/milkdown-lab/node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js in /[redacted]/milkdown-lab/node_modules/.pnpm/tsup@8.2.4_typescript@5.5.4/node_modules/tsup/dist/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/[redacted]/milkdown-lab/node_modules/.pnpm/tsup@8.2.4_typescript@5.5.4/node_modules/tsup/dist/index.js:41:14)
at /[redacted]/milkdown-lab/node_modules/.pnpm/tsup@8.2.4_typescript@5.5.4/node_modules/tsup/dist/chunk-CDF4QN4B.js:95:82
at async CAC.<anonymous> (/[redacted]/milkdown-lab/node_modules/.pnpm/tsup@8.2.4_typescript@5.5.4/node_modules/tsup/dist/chunk-CDF4QN4B.js:95:23)
at async main (/[redacted]/milkdown-lab/node_modules/.pnpm/tsup@8.2.4_typescript@5.5.4/node_modules/tsup/dist/chunk-CDF4QN4B.js:148:3)
ELIFECYCLE Command failed with exit code 1.
enpitsuLin commented
Can't reproduce this, which node version are you using, I'm using node 20.15.1LTS btw
nikoPLP commented
Yeah it must be my outdated dev env.
node v16.13.1
pnpm 7.15.0
but i am in a rush to finish something with my project and i am not touching anything on my dev env for the next few weeks.
So i'll upgrade node and pnpm a bit later.
Just wanted to let you see what was the issue on my end.
You can close this issue.
Thanks for everything!