Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Fix inpage demo in node 18.19+Β #174

@voltrevo

Description

@voltrevo
➜  inpage git:(main) yarn setup
yarn run v1.22.19
$ yarn && scripts/setup.ts
[1/4] πŸ”  Resolving packages...
success Already up-to-date.
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/dev/workspaces/ethf/wax/demos/inpage/scripts/setup.ts
    at new NodeError (node:internal/errors:405:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:136:11)
    at defaultGetFormat (node:internal/modules/esm/get_format:182:36)
    at defaultLoad (node:internal/modules/esm/load:101:20)
    at nextLoad (node:internal/modules/esm/hooks:864:28)
    at load (/Users/dev/workspaces/ethf/wax/demos/inpage/node_modules/ts-node/dist/child/child-loader.js:19:122)
    at nextLoad (node:internal/modules/esm/hooks:864:28)
    at Hooks.load (node:internal/modules/esm/hooks:447:26)
    at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:786:20) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

nodejs/node#43772 seems to be the trigger. It's relevant and landed in 18.19 and the issue does not reproduce in 18.18.

Also affects node v20 since 20.0.0.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🀝 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions