Skip to content

Crypto warnings coming up for import crypto from 'crypto' #23203

Closed
@guybedford

Description

When running Node with --experimental-modules I'm getting warnings on crypto:

test.mjs

import crypto from 'crypto';
node --experimental-modules test.mjs
(node:12120) ExperimentalWarning: The ESM module loader is experimental.
(node:12120) [DEP0091] DeprecationWarning: crypto.DEFAULT_ENCODING is deprecated.
(node:12120) [DEP0010] DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:12120) [DEP0011] DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.

Ideally we should hide deprecation warnings that are output during named exports population for core modules.

//cc @node/modules @devsnek

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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