Skip to content

Instantly share code, notes, and snippets.

@tyre
Created July 26, 2023 21:32
Show Gist options
  • Save tyre/8493803ae8ac4dcd6f942b7ac1966df2 to your computer and use it in GitHub Desktop.
Save tyre/8493803ae8ac4dcd6f942b7ac1966df2 to your computer and use it in GitHub Desktop.
NOOOOOOOOOOde

pnpm dlx ts-node boop.ts --verbose

import "dotenv/config";
import { AutoTokenizer } from "@xenova/transformers";
{
"name": "playground",
"version": "1.0.0",
"description": "",
"dependencies": {
"@types/node": "20.4.5",
"@xenova/transformers": "2.4.2",
"dotenv": "8.2.0",
"typescript": "^5.1.6"
},
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": ">=18.0.0"
},
"type": "module",
"keywords": [],
"author": "",
"license": "ISC"
}
{
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"allowJs": true,
"isolatedModules": true,
"moduleResolution": "NodeNext",
"module": "NodeNext",
"preserveWatchOutput": true,
"skipLibCheck": true,
"noEmit": true,
"strict": true,
"lib": [
"es2015",
"dom"
],
"target": "ES2015"
},
"ts-node": {
"esm": true
},
"exclude": [
"node_modules"
]
}
@tyre
Copy link
Author

tyre commented Jul 26, 2023

without:

  "ts-node": {
    "esm": true
  },

in tsconfig.json:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/tyre77/workspace/llm/ts-hub/playground/mods/boop.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment