This is not a error!!!
operating system: Windows 10,
node: 15.1.0,
npm: 6.14.8,
webpack: 5.4.0,
postcss: 8.1.4
This is only a warning issued by "nodejs". It is recommended to make corrections according to the warning, because some writing methods are not recommended.
fixed in this PR
https://github.com/postcss/postcss/pull/1456
The fix was released in 8.1.5.
@ShenHongFei just replacing ./
→ ./*
cause an issue in Node.js 12.
Can we fix this warning by adding ./
and ./*
together in package.json→exports
?
@ShenHongFei just replacing
./
→./*
cause an issue in Node.js 12.Can we fix this warning by adding
./
and./*
together inpackage.json→exports
?
Yes, that works.
How I can see this warning?
@LP1994 what do I need to call to see this warning?
@LP1994 what do I need to call to see this warning?
These warnings appear only after upgrading to the following versions:
"postcss": "8.1.6",
"webpack": "5.4.0",
"npm": "6.14.8",
"node": "15.1.0",
operating system: Windows 10
Another way to fix the problem https://github.com/postcss/postcss/commit/92155c73e105a36af5196a75bcc34ada377a711f
Nope, this way again kills Node.js 15 in CommonJS.
Can you create a small test repo?
Nope, this way again kills Node.js 15 in CommonJS.
Can you create a small test repo?
Later, I'll try.
Hello. I have DeprecationWarning
(node:29624) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at D:jsprojectwebnode_modulescss-loadernode_modulespostcsspackage.json.
Update this package.json to use a subpath pattern like "./*".
webpack built bb7b669f975520d3919d in 8025ms
i 「wdm」: Hash: bb7b669f975520d3919d
Version: webpack 4.44.2
I too have a deprecation warning, using postcss 8.2.1
nodejs 15.4
nextjs v 10.03
$ yarn dev
yarn run v1.22.5
$ next -p 3434
Loaded env from C:\Users\Anthr\drisdell-consulting-services\.env.local
Loaded env from C:\Users\Anthr\drisdell-consulting-services\.env
(node:12964) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\Users\Anthr\drisdell-consulting-services\node_modules\next\node_modules\postcss\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
ready - started server on http://localhost:3434
(node:12964) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\Users\Anthr\drisdell-consulting-services\node_modules\postcss\package.json.
Update this package.json to use a subpath pattern like "./*".
The current "solution" by changing "./": "./"
to "./*": "./*"
(or adding "./*": "./*"
) did remove the warning, but it breaks the program on certain functionality.
However, if I reading this correctly, according to:
https://nodejs.org/api/packages.html#packages_subpath_exports
shouldn't the change be "./*": "./*.js"
?
I have tried it and it works..but of course, need a more thorough test,
Here is a small repository to reproduce the current warning (pending the solution)
https://github.com/ozbigcat/postcss-1455-deprecation-warning
My environment:
Windows 10
Node 15.3.0
npm 7.1.0
autoprefixer 10.1.0
postcss 8.2.1
postcss-cli 8.3.1
tailwindcss 2.0.2
Uh, just found a case where "./*": "./*.js"
also did not work.
In this case, it tries to look for a 'package.json.js' which is not valid name... happy to go back to the warning... :-(
Having this problem. Also using tailwind, postcss, autoprefixer and gulp. No idea how to solve it.
Is this an error in one of the packages I'm using? It's only a warning at this point so I'm not terribly concerned but I am confused at the error message.
Hello, I was wondering if someone got a solution for that issue, i am having the same issue and replacing with "./*" only breaks other postcss imports in the lib directory (updating to vers. 8.0.0 did not resolve the issue :/)
Edit: I was using node.js version 15.5.1
I'm facing the same warning. I'm on node 15.5.1 with postcss 8.2.4
I managed to fix the problem by downgrading to node.js 14.15.1, maybe it will work for you,
I couldn't find exactly what was the error, updating autowriter and postcss libraries did not work for my case:/
well, i'm getting this warning too, it's coming from node but it's related to postcss
node 15.
postcss 8.2.2
tailwind 2.0
Windows 10.
Getting the same error as those commenting the last few days.
node 15.
postcss 8.2.2
tailwind 2.0
Windows 10.
We do not need more reproduction cases. We need some solution, which will work on all Node.js. Adding ./*
breaking old Node.js versions.
Some relevant PRs from node repo:
Seems like the problem was fixed in Node.js
Can confirm I'm not running into the issue after updating to 15.6.0
upgrading nodejs to v15.8.0 fixed the warnings for me
Most helpful comment
fixed in this PR
https://github.com/postcss/postcss/pull/1456