"Cannot find module" when using NPM subpaths #1712
Unanswered
radek-novak
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a private NPM package with following
tsconfig{ "compilerOptions": { "incremental": true, "allowJs": true, "moduleResolution": "node", "module": "commonjs", "target": "es2019", "lib": ["ES2019"], "outDir": "./_dist", "sourceMap": true, "types": ["jest", "node", "@types/jest"], "typeRoots": ["./node_modules/@types", "typings"], "strict": true, "declaration": true, "skipLibCheck": true }, "include": [ "./src/**/*", "typings"] }which has subpaths set up
and I try to consume it from another node project
{ "compilerOptions": { "incremental": true, "allowJs": true, "module": "commonjs", "target": "es2019", "lib": ["ES2019"], "outDir": "./built", "sourceMap": true, "typeRoots": ["./node_modules/@types", "./src/typings"], "strict": true, "skipLibCheck": true }, "include": ["./src/**/*"] }When I try to run the consuming project with
ts-node-devit errors with:I think my problem is different from #953 because I don't use
pathsnorbaseUrlin neither the package nor the consuming node project, the consuming project typechecks withtsc --noEmitand it runs with regularnodecommand.Beta Was this translation helpful? Give feedback.
All reactions