question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field

See original GitHub issue

When building with tslib, I’m seeing the following on every build:

(node:40688) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at <snip>\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".

I’m pretty sure this started when upgrading to Node 15.1.0.

Environment:

Angular CLI: 11.0.0
Node: 15.1.0
OS: win32 x64

Package                         Version
---------------------------------------------------------
...
typescript                      4.0.5
webpack                         4.44.2
tslib                                 2.0.3

This is an Angular project - I can provide a repro case if it’s not obvious.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:45
  • Comments:43

github_iconTop GitHub Comments

56reactions
EricDitpcommented, May 31, 2021

In NodeJs 16 this issue reintroduced: (node:7972) [DEP0148] DeprecationWarning: Use of deprecated folder mapping “./” in the “exports” field module resolution of the package at ~/node_modules/tslib/package.json. Update this package.json to use a subpath pattern like “./*”.

Versions: 16.0.0 and 16.2.0

Any news?

14reactions
vinayakkulkarnicommented, Jun 18, 2021

Yep, can replicate this with v16.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
DeprecationWarning : Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at node_modules\postcss\ ...
Read more >
Issues - GitHub
DeprecationWarning : Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at G:\SNWS\sn-micro-front-web-project-template ...
Read more >
Deprecated APIs | Node.js v19.3.0 Documentation
Deprecated APIs#. Node.js APIs might be deprecated for any of the following reasons: Use of the API is unsafe. An improved alternative API...
Read more >
App cannot be build - Questions about Thunkable - Community
Cannot resolve the path to “fsevents” package. (node:435007) [DEP0148] DeprecationWarning: Use of deprecated folder mapping “./” in the “exports ...
Read more >
PostCSS on Twitter: "PostCSS 8.2.12 was released. We fixed ...
12 was released. We fixed DEP0148 deprecation warning from Node.js 16: “Use of deprecated folder mapping "./" in the "exports" field” ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found