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

Fix volumeNetworks import #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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.

1 participant