Answer the question
In order to leave comments, you need to log in
How to fix tslib do not define a valid '.' error target?
When using TS (recently started to move, learn it) encountered an error:
Error: Package exports for 'C:\Dev\project\packages\mod\node_modules\tslib' do not define a valid '.' target
at resolveExportsTarget (internal/modules/cjs/loader.js:545:13)
at applyExports (internal/modules/cjs/loader.js:459:14)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Dev\project\packages\mod\vendor\bootstrap.js:4:17)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
{
"compilerOptions": {
/* Projects */
"incremental": true,
"strictPropertyInitialization": false,
"moduleResolution": "Node",
"importHelpers": true,
/* Language and Environment */
"target": "ES6",
"experimentalDecorators": true,
/* Modules */
"module": "CommonJS",
/* Emit */
"sourceMap": false,
"outDir": "../../packages/RP",
"removeComments": true,
/* Interop Constraints */
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
/* Type Checking */
"strict": true,
/* Completeness */
"skipDefaultLibCheck": true,
"skipLibCheck": true
},
"include": [
"./**/*.ts",
"@types/**/*.d.ts",
],
"exclude": [
"node_modules",
]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question