You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect ts-node to run src/index.ts without errors
Actual Behavior
yarn run dotenv -e ../web/.env.local -- ts-node src/index.ts
/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/util.js:62
return value.replace(backslashRegExp, directorySeparator);
^
TypeError: value.replace is not a function
at normalizeSlashes (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/util.js:62:18)
at Object.getExtendsConfigPath (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/ts-internals.js:24:54)
at readConfig (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/configuration.js:127:64)
at findAndReadConfig (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/configuration.js:50:84)
at phase3 (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/bin.js:254:67)
at bootstrap (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/bin.js:47:30)
at main (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/bin.js:33:12)
at Object.<anonymous> (/home/ridhwaans/Source/test/.yarn/__virtual__/ts-node-virtual-c211acd0da/3/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist/bin.js:579:5)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
Node.js v20.13.1
Steps to reproduce the problem
Install yarn 4.5.1 (berry)
yarn add ts-node --dev
Install dotenv
copy the src/index.ts, tsup and ts-node configs
Run `yarn run dotenv -e ../web/.env.local -- ts-node src/index.ts
//tsup.config.tsimport{defineConfig}from'tsup';exportdefaultdefineConfig((opts)=>({entry: ['./src/index.ts'],format: ['cjs'],// CommonJS formatsplitting: false,// Avoid splittingsourcemap: true,minify: !opts.watch,clean: !opts.watch,dts: true,outDir: 'dist',esbuildOptions: (options)=>{options.external=['path','fs','os'];// Mark Node.js built-in modules as externaloptions.platform='node';// Ensure the target platform is Node.js},}));
Search Terms
Expected Behavior
I expect ts-node to run src/index.ts without errors
Actual Behavior
Steps to reproduce the problem
Minimal reproduction
Specifications
The text was updated successfully, but these errors were encountered: