Skip to content

Instantly share code, notes, and snippets.

@cspotcode
Last active April 6, 2022 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cspotcode/fad6f0d170067ea67e9835cfeedf235f to your computer and use it in GitHub Desktop.
Save cspotcode/fad6f0d170067ea67e9835cfeedf235f to your computer and use it in GitHub Desktop.
P.S: Ran the cmd without nodemon as well, same error

To try this, run npm start

import './other';
{
"watch": ["src/"],
"ext": "ts,json",
"exec": "node --loader ts-node/esm --experimental-specifier-resolution=node src/index.ts",
"events": {
"start": "cls || clear"
}
}
export {};
console.log('hello from other');
{
"name": "multibot",
"version": "0.0.1",
"description": "A multi-purpose bot without premiums.",
"type": "module",
"scripts": {
"start": "cross-env NODE_OPTIONS=--experimental-specifier-resolution=node ts-node ./index.ts"
},
"devDependencies": {
"cross-env": "^7.0.3",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
}
}
{
"compilerOptions": {
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"module": "ESNext", /* Specify what module code is generated. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
},
"ts-node": {
"esm": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment