Skip to content

Conversation

@tuyakhov
Copy link

When running scripts using ts-node, the library produces the following error:

ts-node scripts/curve.ts

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/MyProject/node_modules/@curvefi/api/lib/constants/volumeNetworks' imported from /MyProject/node_modules/@curvefi/api/lib/utils.js
    at new NodeError (node:internal/errors:387:5)
    at finalizeResolution (node:internal/modules/esm/resolve:330:11)
    at moduleResolve (node:internal/modules/esm/resolve:907:10)
    at defaultResolve (node:internal/modules/esm/resolve:1115:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:841:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

A minimum reproducible example can be found here https://stackblitz.com/edit/stackblitz-starters-blfcep

This issue is caused by the missing .js extension for volumeNetworks import, which is also inconsistent with the rest of the imports in the repository.

@DanielSchiavini
Copy link
Contributor

Already fixed in master

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

Successfully merging this pull request may close these issues.

2 participants