Open
Description
- Version: 16.0
- Platform: Linux foxbat 5.11.15-200.fc33.x86_64 deps: update openssl to 1.0.1j #1 SMP Fri Apr 16 13:41:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
What steps will reproduce the bug?
npm i postcss
echo "let list = require('postcss/lib/list')" > index.js
node index.js
The output:
(node:12793) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/ai/test-cjs/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
But replacing exports
in PostCSS’s package.json
to "./*": "./*.js"
will break old Node.js.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
- Not show deprecation warning until we have active Node.js without
*
support. - Suggest a solution to support both syntaxes.
Additional information
The warning was disabled in Node.js 15.
Activity