You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use @swc/register on TypeScript code, even extremely simple code, it fails with the error:
/<project>/node_modules/@swc/core/index.js:121
return super.transformSync(isModule ? JSON.stringify(src) : src, isModule, options);
^
Error: internal error in Neon module: assertion failed: `(left == right)`
left: `"both"`,
right: `"inline"`: Source map must be true, false or inline
at Compiler.transformSync (/<project>/node_modules/@swc/core/index.js:121:22)
at Object.transformSync (/<project>/node_modules/@swc/core/index.js:189:21)
at compile (/<project>/node_modules/@swc/register/lib/node.js:63:22)
at compileHook (/<project>/node_modules/@swc/register/lib/node.js:78:16)
at Module._compile (/<project>/node_modules/pirates/lib/index.js:93:29)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .ts] (/<project>/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
With some other config variants (besides the one shown below), I get a different error:
/<project>/node_modules/@swc/core/index.js:121
return super.transformSync(isModule ? JSON.stringify(src) : src, isModule, options);
^
Error: failed to process config file
at Compiler.transformSync (/<project>/node_modules/@swc/core/index.js:121:22)
at Object.transformSync (/<project>/node_modules/@swc/core/index.js:189:21)
at compile (/<project>/node_modules/@swc/register/lib/node.js:63:22)
at compileHook (/<project>/node_modules/@swc/register/lib/node.js:78:16)
at Module._compile (/<project>/node_modules/pirates/lib/index.js:93:29)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/<project>/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
When I try to use
@swc/register
on TypeScript code, even extremely simple code, it fails with the error:With some other config variants (besides the one shown below), I get a different error:
(Filed here instead of https://github.com/swc-project/register because it seems like issue tracking is centralized to this main repo right now?)
Input code
file.ts
(similar errors if config is modified for JS code):Run in console:
Config
This was based on the samples in the documentation.
Also happens if I add some
jsc
settings:Expected behavior
The code is compiled and runs.
Version
@swc/core
: 1.1.39@swc/register
: 0.1.6Node 10.15.1
Mac OS 10.15.3
The text was updated successfully, but these errors were encountered: