Skip to content

module.register() is deprecated #490

@marlitas

Description

@marlitas

While on Node version 26.0.0 I kept getting the deprecation warning (node:77345) [DEP0205] DeprecationWarning: module.register()is deprecated. Usemodule.registerHooks() instead.

Trace:

(node:78602) [DEP0205] DeprecationWarning: `module.register()` is deprecated. Use `module.registerHooks()` instead.
    at node:internal/util:129:11
    at Module.register (node:internal/modules/esm/loader:969:3)
    at register (file:///Users/marlitas/my_code/PhET/totality/perennial-alias/node_modules/tsx/dist/register-hc1YoAqe.mjs:1:906)
    at file:///Users/marlitas/my_code/PhET/totality/perennial-alias/node_modules/tsx/dist/esm/index.mjs:2:4656
    at ModuleJob.run (node:internal/modules/esm/module_job:437:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:642:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:96:9)

Looks like we would want to upgrade our tsx to ^4.22.0 in order to get rid of it. However, I am not motivated enough do to the research into what that would take. Instead I decided to downgrade my node to v22.22.3. Feels worth creating an issue for in case anyone else runs into this and/or we decide to do something about it.

Linking to this other deprecation warning issue since they're both related to newer node versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions