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

Cannot find module 'steiger' or its corresponding type declarations. #110

Open
noveogroup-amorgunov opened this issue Oct 21, 2024 · 2 comments

Comments

@noveogroup-amorgunov
Copy link

Hey! Get a error for project:

Cannot find module 'steiger' or its corresponding type declarations.
  There are types at '/XXX/node_modules/steiger/dist/app.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

We use moduleResolution with node value.

TS config in project:

//tsconfig.json
{
  "compilerOptions": {
    "target": "ES2021",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node", // <---------
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "baseUrl": "src",
    "paths": {},
    "typeRoots": [],
    "plugins": []
  },
  "include": [],
  "exclude": []
}

Do you have any ideas what this happens?

@illright
Copy link
Member

Thanks for reporting! I don't know why this happens, not off the top of my head, will need to investigate.

But I'm curious why you have moduleResolution: "node". If I remember correctly, "node" is an unfortunate alias for "node10", a hopelessly out-of-date module resolution algorithm, I hope you're not using Node 10 in production still :)

@noveogroup-amorgunov
Copy link
Author

I hope you're not using Node 10 in production still :)

Fortunately, we don't use node10 in production :) I try to up moduleResolution to nodenext, but it requires up module and then I can't build server part of project. But I will try to update the options in my project and will come back if I update them successfully.

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

2 participants