Registry / devops / swc-jit

swc-jit

JSON →
library0.2.0jsnpmunverified

swc-jit v0.2.0 provides a just-in-time transpiler for Node.js using the experimental loader API, allowing TypeScript files to be executed directly without precompilation. It integrates with SWC for fast transpilation and supports source maps for debugging. The package is designed as a lighter alternative to ts-node, leveraging SWC's speed. However, it relies on Node's experimental loaders, which may change across Node versions. The package has no recent updates and may be considered in maintenance mode.

npm install swc-jit
INSTALL
IMPORT
SIG · SWC-JIT
S
swc-jit
devopsjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
node --experimental-loader swc-jit --enable-source-maps index.ts
ts-node or other loaders
CLI usage, not programmatic import

Installs and runs a TypeScript file directly using Node's experimental loader with source maps.

npm install swc-jit node --experimental-loader swc-jit --enable-source-maps index.ts
Debug
Known issues
breakingNode --experimental-loader flag is experimental and may change or be removed in future Node versions.
fix
Use a stable alternative like ts-node or @swc-node/register for production.
affects: >=12.0.0
deprecatedPackage has not been updated since 2021; may have compatibility issues with newer Node or SWC versions.
fix
Consider using @swc-node/register or tsx as maintained alternatives.
affects: *
gotchaSource maps require both --experimental-loader and --enable-source-maps flags.
fix
Always pass both flags: node --experimental-loader swc-jit --enable-source-maps index.ts
affects: *
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'swc-jit'
Package not installed or not in node_modules.
fix
Run `npm install swc-jit` in the project directory.
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string
Node version too old or incompatible loader hook.
fix
Use Node >=12.17.0 and ensure --experimental-loader is correctly specified.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
@swc/corerequiredSWC transpiler engine
Agent activity
7 hits · last 30 days
node
6
Resources
swc-jit — npm install swc-jit · libregistry