Skip to content

DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field #1465

Closed
@marcbachmann

Description

@marcbachmann

Node 16 logs a deprecation warning that the syntax for the exports declaration in the package.json changed from "./": "./" to "./*": "./*" .

(node:97520) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/marcbachmann/Development/livingdocsIO/livingdocs-server/master/node_modules/@elastic/elasticsearch7/package.json.
Update this package.json to use a subpath pattern like "./*".
    at emitFolderMapDeprecation (node:internal/modules/esm/resolve:69:11)
    at packageExportsResolve (node:internal/modules/esm/resolve:542:7)
    at resolveExports (node:internal/modules/cjs/loader:477:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:517:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:926:27)

Node 12 doesn't support this new declaration and therefore this would be a breaking change.
How can we get rid of the deprecation warning for newer environments without breaking support for older versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions