ts-node
ts-node copied to clipboard
ts-node fails to look for path params
Search Terms
Rel https://github.com/prisma/prisma/issues/21703
Expected Behavior
Should'nt through compile time errors
Actual Behavior
ts-node --transpile-only prisma/seed.ts
Debugger listening on ws://127.0.0.1:54798/882dc855-6daa-4d41-83fa-c11951d6b78e
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Error: Cannot find module '@enums/ipfsProviders'
Require stack:
- /Users/hiro/Decenter/app.decenterai.com/prisma/seed.ts
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/opt/homebrew/lib/node_modules/ts-node/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:934:27)
at Module.require (node:internal/modules/cjs/loader:1157:19)
at require (node:internal/modules/helpers:119:18)
at Object.<anonymous> (/Users/hiro/Decenter/app.decenterai.com/prisma/seed.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module.m._compile (/opt/homebrew/lib/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Object.require.extensions.<computed> [as .ts] (/opt/homebrew/lib/node_modules/ts-node/src/index.ts:1621:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/Users/hiro/Decenter/app.decenterai.com/prisma/seed.ts' ]
}
Waiting for the debugger to disconnect...
Steps to reproduce the problem
git clone https://github.com/DeCenter-AI/app.decenterai.com
git checkout a33d8f4
pnpm install
npm run prisma:generate
ts-node --transpile-only prisma/seed.ts
Minimal reproduction
tsc prisma/seed.ts
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2650:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'beforeEach' must be of type 'Lifecycle', but here has type 'HookFunction'.
2650 declare var beforeEach: Mocha.HookFunction;
~~~~~~~~~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:34:13
34 declare var beforeEach: jest.Lifecycle;
~~~~~~~~~~
'beforeEach' was also declared here.
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2668:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'afterEach' must be of type 'Lifecycle', but here has type 'HookFunction'.
2668 declare var afterEach: Mocha.HookFunction;
~~~~~~~~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:36:13
36 declare var afterEach: jest.Lifecycle;
~~~~~~~~~
'afterEach' was also declared here.
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2684:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'describe' must be of type 'Describe', but here has type 'SuiteFunction'.
2684 declare var describe: Mocha.SuiteFunction;
~~~~~~~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:37:13
37 declare var describe: jest.Describe;
~~~~~~~~
'describe' was also declared here.
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2705:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'xdescribe' must be of type 'Describe', but here has type 'PendingSuiteFunction'.
2705 declare var xdescribe: Mocha.PendingSuiteFunction;
~~~~~~~~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:39:13
39 declare var xdescribe: jest.Describe;
~~~~~~~~~
'xdescribe' was also declared here.
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2719:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'it' must be of type 'It', but here has type 'TestFunction'.
2719 declare var it: Mocha.TestFunction;
~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:40:13
40 declare var it: jest.It;
~~
'it' was also declared here.
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2733:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'test' must be of type 'It', but here has type 'TestFunction'.
2733 declare var test: Mocha.TestFunction;
~~~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:43:13
43 declare var test: jest.It;
~~~~
'test' was also declared here.
node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2740:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'xit' must be of type 'It', but here has type 'PendingTestFunction'.
2740 declare var xit: Mocha.PendingTestFunction;
~~~
node_modules/.pnpm/@[email protected]/node_modules/@types/jest/index.d.ts:42:13
42 declare var xit: jest.It;
~~~
'xit' was also declared here.
prisma/seed.ts:2:41 - error TS2307: Cannot find module '@enums/ipfsProviders' or its corresponding type declarations.
2 import {IPFSProviders, LIGHTHOUSE} from '@enums/ipfsProviders'
~~~~~~~~~~~~~~~~~~~~~~
Found 8 errors in 2 files.
Errors Files
7 node_modules/.pnpm/@[email protected]/node_modules/@types/mocha/index.d.ts:2650
1 prisma/seed.ts:2
Specifications
- ts-node version:v10.9.1
- node version:v19.9.0
- TypeScript version:Version 5.0.4
- tsconfig.json, if you're using one: https://github.com/DeCenter-AI/app.decenterai.com/blob/a33d8f42824ed6cae33140994508ea948b18a503/tsconfig.json#L25
- package.json: https://github.com/DeCenter-AI/app.decenterai.com/blob/a33d8f42824ed6cae33140994508ea948b18a503/package.json#L94
- Operating system and version:
- MacOS- Ventura
- node version: