ts-node
ts-node copied to clipboard
Errors with @swc/wasm 1.3.20
Search Terms
swc
Expected Behavior
No errors when running scripts after updating @swc/wasm
from 1.3.18 to 1.3.20
Actual Behavior
Errors when running scripts after updating @swc/wasm
from 1.3.18 to 1.3.20
Steps to reproduce the problem
- Open https://stackblitz.com/edit/node-lw1wmy?file=tsconfig.json,index.ts,package.json
- Run
ts-node index.ts
- Observe error
/home/projects/node-lw1wmy/node_modules/ts-node/src/transpilers/swc.ts:262 throw new Error( ^ Error: @swc/wasm threw an error when attempting to validate swc compiler options. You may be using an old version of swc which does not support the options used by ts-node. Try upgrading to the latest version of swc. Error message from swc:
- downgrade to
@swc/[email protected]
and run again to see it work.
Minimal reproduction
https://stackblitz.com/edit/node-lw1wmy?file=tsconfig.json,index.ts,package.json
Specifications
- ts-node version: v10.9.1
- node version: v16.14.2
- TypeScript version: v4.9.3
- tsconfig.json, if you're using one:
{
"compilerOptions": {
"module": "CommonJS"
},
"ts-node": {
"swc": true
}
}
- package.json:
{
"name": "node-starter",
"version": "0.0.0",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@swc/wasm": "1.3.20",
"@types/node": "^18.11.9",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
}
}
- Operating system and version: Stackblitz
- If Windows, are you using WSL or WSL2?: