Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @xrplf/isomorphic/*** from .mts file results in ERR_MODULE_NOT_FOUND error #2728

Open
tequdev opened this issue Jul 8, 2024 · 0 comments

Comments

@tequdev
Copy link
Contributor

tequdev commented Jul 8, 2024

  • index.mts
import { sha512 } from '@xrplf/isomorphic/sha512'

console.log(sha512('hello world'))
npx tsx index.mts

node:internal/modules/run_main:115
    triggerUncaughtException(
    ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/tequ/project/test/node_modules/@xrplf/isomorphic/sha512/index.jsx' imported from /Users/tequ/project/test/index.mts
    at finalizeResolution (node:internal/modules/esm/resolve:260:11)
    at moduleResolve (node:internal/modules/esm/resolve:921:10)
    at defaultResolve (node:internal/modules/esm/resolve:1120:11)
    at nextResolve (node:internal/modules/esm/hooks:746:28)
    at resolveExtensions (file:///Users/tequ/project/test/node_modules/tsx/dist/esm/index.mjs?1720427330474:2:2832)
    at async resolveDirectory (file:///Users/tequ/project/test/node_modules/tsx/dist/esm/index.mjs?1720427330474:2:3468)
    at async resolve (file:///Users/tequ/project/test/node_modules/tsx/dist/esm/index.mjs?1720427330474:2:4202)
    at async nextResolve (node:internal/modules/esm/hooks:746:22)
    at async Hooks.resolve (node:internal/modules/esm/hooks:238:24)
    at async handleMessage (node:internal/modules/esm/worker:199:18) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///Users/tequ/project/test/node_modules/@xrplf/isomorphic/sha512/index.jsx'
}

Node.js v22.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant