'DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at node_modules\postcss\package.json
Since I upgraded Node to version 16, I started noticing this when I build my Angular app.
DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at "...\node_modules\postcss\package.json".
Update this package.json to use a subpath pattern like "./*".
Is there a way to fix this without downgrading the Node version?
Solution 1:[1]
Regarding the GitHub issue, this one is recurrent one:
https://github.com/postcss/postcss/issues/1455#issuecomment-872240742
An update of postcss should do the job.
Solution 2:[2]
I was using node 16 switched back to 14 and it started working.
Solution 3:[3]
Solution:
- Go to defined location
C:\<xampp>\htdocs\<projName>\node_modules\tslib\package.json. - At exports field - replace this
"./": "./"to"./": "./*".
Solution 4:[4]
Take a look at your package.json and check if you have --prod flag in the build script, if so update it for
--configuration production
That will solve the issue, too
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nick Jones |
| Solution 2 | irzum shahid |
| Solution 3 | CFrei |
| Solution 4 | Fredy Acuna |
