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

type=module is somehow incompatible with babel #1675

Closed
NullVoxPopuli opened this issue Nov 19, 2023 · 1 comment
Closed

type=module is somehow incompatible with babel #1675

NullVoxPopuli opened this issue Nov 19, 2023 · 1 comment

Comments

@NullVoxPopuli
Copy link
Collaborator

NullVoxPopuli commented Nov 19, 2023

With a TS v2 addon, and type module, I can't build the project, and receive this error:

/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/highlight/lib/index.js:10
var _chalk = _interopRequireWildcard(require("chalk"), true);
                                     ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/chalk/source/index.js from /home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/highlight/lib/index.js not supported.
Instead change the require of /home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/chalk/source/index.js in /home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/highlight/lib/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/highlight/lib/index.js:10:38)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/code-frame/lib/index.js:8:18)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/template/lib/parse.js:9:18)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/template/lib/string.js:8:14)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/template/lib/builder.js:8:15)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/template/lib/index.js:8:16)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/helper-function-name/lib/index.js:7:17)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/helper-create-class-features-plugin/lib/index.js:32:27)
    at Object.<anonymous> (/home/nullvoxpopuli/Development/NullVoxPopuli/preem/node_modules/.pnpm/node_modules/@babel/plugin-transform-typescript/lib/index.js:9:40)
npm run build:js exited with code 1

I don't have any hypothesis for this one

@NullVoxPopuli NullVoxPopuli changed the title type=module is somehow now compatible with babel type=module is somehow incompatible with babel Nov 19, 2023
@NullVoxPopuli
Copy link
Collaborator Author

In trying to get a repro for this one, it stopped happening... I'm perplexed.

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

No branches or pull requests

1 participant