Closed magnihansen closed 1 year ago
I just triggered this on a new build, it's confusing though:
: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\g\LogicmediaAngularNpm\logicmedia-angular\library-container-project\projects\logicmedia-angular\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./".
Use of deprecated folder mapping "./" in the "exports" field... Update this package.json to use a subpath pattern like "./"
My error message looks slightly different:
DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of
the package at C:\...\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".
According to Node docs, it should just be replacing ./
with ./*
.
"exports": {
".": {
"module": "./tslib.es6.js",
"import": "./modules/index.js",
"default": "./tslib.js"
},
- "./": "./"
+ "./*: "./*"
}
Though I can't see the reason to export everything in the root. Mostly since there are pretty much no Javascript files to import. The only thing that might need to be exported as far as I know is package.json
.
- "./": "./"
+ "./package.json: "./package.json"
i have the same issue on a svelte project because of some deep dependency. Would be good to have this warning gone
This is a duplicate of #134. Would be nice to see fixed
tslib now breaks in node 17:
Error loading `tslib` helper library.
[!] Error: Package subpath './package.json' is not defined by "exports" in .../tslib/package.json
Dupe of #134, fixed back in tslib 2.4.0.
When building my Angular 12 library application i'm getting a new deprecation warning after updating to Angular 12.
My warning message (local folders): (node:9872) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\g\LogicmediaAngularNpm\logicmedia-angular\library-container-project\projects\logicmedia-angular\node_modules\tslib\package.json. Update this package.json to use a subpath pattern like "./".
I'm using tslib@2.3.0 and Angular 12.1.1 I'm compiling my Angular library application using Ivy partial compilation mode.
🙁 Actual behavior My library application builds and my npm package can be published but publishing with red lines is not intended.
🙂 Expected behavior Angular not showing these red lines when building.