#Cannot find type definition file for 'inbox'

5 messages · Page 1 of 1 (latest)

smoky hollow
#

Hi,

I've been having an issue with a type definition.
I have a file that defines the types for a bunch of objects related to inbox.

I do have an inbox.ts file that defines those types.
But for some reason, when running the command:

tsc --module es2022 --noEmit --typeRoots "modules,**/modules/**,types,**/types/**,**/node_modules/**/@types,node_modules/@types,**/declarations/**,src/shared/declarations,src/shared/types,src/shared/types/inbox" --target "es6" --sourceMap --pretty --removeComments --experimentalDecorators --declaration --allowJs --allowSyntheticDefaultImports --esModuleInterop --forceConsistentCasingInFileNames --isolatedModules --jsx "react-jsx" --noEmit --noFallthroughCasesInSwitch --resolveJsonModule --moduleResolution "node" --skipLibCheck --strict --rootDir "." --baseUrl "." src/shared/declarations/@cytora/application-storage.d.ts src/shared/declarations/@cytora/custom-hooks.d.ts src/shared/declarations/@cytora/error-lib-utils.d.ts src/shared/declarations/@cytora/external-services.d.ts src/shared/declarations/@cytora/index.d.ts src/shared/declarations/diff-json.d.ts src/shared/declarations/fastest-json-copy.d.ts src/shared/declarations/global.d.ts src/shared/declarations/inbox.d.ts src/shared/declarations/locize.d.ts src/shared/declarations/svg.d.ts

I'm having the error

error TS2688: Cannot find type definition file for 'inbox'.
  The file is in the program because:
    Entry point for implicit type library 'inbox'

It doesn't say more than that. I tried multiple things, including created a inbox.d.ts file with declare module 'inbox but it doesn't work either.
I have no module called inbox in my package.json nor import anything like in my code.

Any idea what is could be? I'm running out of ideas.
The weird thing as well is, it doesn't seem like my colleagues are having this issue. Only me

raw harness
#

!*:no-tsc-args

wraith sedgeBOT
#
retsam19#0
`!retsam19:no-tsc-args`:

You should always run tsc without arguments: e.g. npx tsc not npx tsc src/index.ts. Running it with arguments will ignore your tsconfig file.

Instead of passing files to tsc, the include/exclude/files settings inside your tsconfig are used to control what is copied.

raw harness
#

It looks like this may be a factor, since you're passing a list of files.

smoky hollow
#

Hmm, I'm not sure why we are using args. It's been setup by my company before I joined, they must have a reason...
Interestingly, the whole lintstagedrc is make in such a way that the params are dynamic