Cannot "export *" from package #10346
Unanswered
lrondanini
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hi,
I have a nestjs (v11) app trying to include a package that exports a class.
If the packge exports the class like:
export class Test {.......}
everything works fine but I move the class to a subfolder and I export it using:
export * from ./subfolder/index
nestjs complains with an ERR_MODULE_NOT_FOUND.
I tried many combination module/moduleResolution/paths but no luck.
Additional information
These are my confs:
tsconfig/base.json:
{ "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { "declaration": true, "declarationMap": true, "esModuleInterop": true, "incremental": false, "isolatedModules": true, "lib": ["es2022", "DOM", "DOM.Iterable"], "module": "ES2022", "moduleResolution": "bundler", "moduleDetection": "force", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "strict": true, "target": "ES2022" } }
for the package:
{ "extends": "@hyperbound/typescript-config/base.json", "compilerOptions": { "outDir": "./dist", "strict": false }, "include": ["src"], "exclude": ["node_modules", "dist"] }
for nestjs
{ "extends": "@hyperbound/typescript-config/base.json", "compilerOptions": { "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "ES2023", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": true, "forceConsistentCasingInFileNames": true, "noImplicitAny": false, "strictBindCallApply": false, "noFallthroughCasesInSwitch": false } }
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions