postcss / postcss-safe-parser

Fault tolerant CSS parser for PostCSS
MIT License
120 stars 12 forks source link

Use of deprecated folder mapping "./" in the "exports" #21

Closed robinmattern closed 3 years ago

robinmattern commented 3 years ago

In nodejs v15 your module is causing this warning. It's very annoying.

(node:43364) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package 
at ..\myapp\node_modules\postcss-safe-parser\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)

The fix is presumably in theexports field of the package.json file for the module postcss:

  "exports": {
    "." : { "require": "./lib/postcss.js",
            "import" : "./lib/postcss.mjs",
            "types"  : "./lib/postcss.d.ts"
             },
    "./": "./"
     },
ai commented 3 years ago

Update your Node.js. It is a bug of early 15.x versions.

robinmattern commented 3 years ago

Thank you for the info. I missed installed NVM and the latest node version. Warning message is gone.

On Sun, Feb 14, 2021, 2:50 PM Andrey Sitnik notifications@github.com wrote:

Update your Node.js. It is a bug of early 15.x versions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/postcss/postcss-safe-parser/issues/21#issuecomment-778831652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI2ZG7TKDDDVPPHMDIK7A3S7ASQJANCNFSM4XTPF3UA .