{"id":15794384,"url":"https://github.com/jlenon7/.ts-node","last_synced_at":"2025-09-09T15:41:30.326Z","repository":{"id":198864920,"uuid":"701700135","full_name":"jlenon7/.ts-node","owner":"jlenon7","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-09T11:35:28.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-27T02:42:59.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlenon7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-07T10:01:44.000Z","updated_at":"2023-10-07T10:03:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"90d85785-7616-4770-8196-e67b4bb6b066","html_url":"https://github.com/jlenon7/.ts-node","commit_stats":null,"previous_names":["jlenon7/.ts-node"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jlenon7/.ts-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlenon7%2F.ts-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlenon7%2F.ts-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlenon7%2F.ts-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlenon7%2F.ts-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlenon7","download_url":"https://codeload.github.com/jlenon7/.ts-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlenon7%2F.ts-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274319832,"owners_count":25263365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T23:41:26.388Z","updated_at":"2025-09-09T15:41:30.232Z","avatar_url":"https://github.com/jlenon7.png","language":"JavaScript","readme":"# Supporting TS with Node.js like Deno\n\n\u003e This repo was created with the goal of providing a way to\n\u003e support running `.ts` files anywhere on your machine using\n\u003e ESM or CommonJS in Node.js v20.x.\n\n🚨 Tested only in **MacOS** with Node.js **v20.8.0** 🚨\n\n## Updating to Node.js v20.x\n\nThe easiest way is using [`nvm`](https://github.com/nvm-sh/nvm). To\ninstall it run the following:\n\n```shell\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash\n```\n\nNow that `nvm` is installed, run the following to update Node.js:\n\n```shell\nnvm install 20.8.0\n```\n\nTo set v20.8.0 as your default for all your terminal sessions run:\n\n```shell\nnvm alias default 20.8.0\n```\n\n## Installation and usage\n\nStart cloning this repo to the **home directory** of your machine and installing it\ndependencies:\n\n```shell\ngit clone https://github.com/jlenon7/.ts-node.git ~/.ts-node \u0026\u0026 cd ~/.ts-node \u0026\u0026 npm i \u0026\u0026 cd\n```\n\nLet's add the `NODE_OPTIONS` environment variable to your \nterminal profile file (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).\nIf you are using MacOS, your will probably be `~/.zshrc`:\n\n\u003e For `~/.zshrc`:\n\n```shell\necho 'export NODE_OPTIONS=\"--require=$HOME/.ts-node/register.cjs\"' \u003e\u003e ~/.zshrc \u0026\u0026 source ~/.zshrc\n```\n\nAt this point you are able to run the following:\n\n```shell\necho \"console.log('Hello World!')\" \u003e\u003e ~/Desktop/index.ts\nnode ~/Desktop/index.ts\n```\n\nYou could also use in npm projects, but you will need to install\n`ts-node` and configure a `tsconfig.json` for your project:\n\n```shell\nmkdir ts-project \u0026\u0026 cd ts-project\nnpm init -y\nnpm install ts-node -D\ncp ~/.ts-node/tsconfig.json tsconfig.json\necho \"console.log('Hello World!')\" \u003e\u003e index.ts\nnode index.ts\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlenon7%2F.ts-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlenon7%2F.ts-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlenon7%2F.ts-node/lists"}