Closed
Description
Description
This isn't an error, but a warning produced by Node.js:
(node:25986) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/lex/Projects/UNICORNWARE/react-survey-app/node_modules/@flex-development/tutils/package.json.
Update this package.json to use a subpath pattern like "./*".
Steps to reproduce
- Build esm (or cjs-esm hybrid) project that uses
@flex-development/tutils
- See warning in terminal
Expected behavior
A warning should not be produced.
Relevant screenshots
N/A
Environment
- Node Version:
16.0.0
- OS:
macOS v11.3.1
- Package Manager:
yarn@3.0.2
- Package version(s):
>=4.2.2
- Browser: N/A
Possible solution
- Add
"./*": "./*"
above"./": "./"
or - Replace
"./": "./"
with"./*": "./*"
(for some versions of Node.12, this is not a viable solution) or - Remove path mapping entirely
Additional context
- Node.js 12 reached End-of-Life status on April 30th, 2022
- Large projects are encountering the same warning:
Update package.json: changed pattern "./" to "./*" microsoft/tslib#135
DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at G:\SNWS\sn-micro-front-web-project-template\node_modules\postcss\package.json. postcss/postcss#1455
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done