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

Types misconfigured for "moduleResolution" set to "node" #4

Open
petertonysmith94 opened this issue Dec 1, 2024 · 0 comments · May be fixed by #5
Open

Types misconfigured for "moduleResolution" set to "node" #4

petertonysmith94 opened this issue Dec 1, 2024 · 0 comments · May be fixed by #5

Comments

@petertonysmith94
Copy link

Summary

TypeScript isn't properly resolving the type definitions for @webpod/ps under the current module resolution strategy ('node').

Reproduction

mkdir example-webpod-types && \
  cd example-webpod-types && \
  pnpm init && \
  pnpm add typescript@latest && \
  pnpm tsc --init && \
  pnpm add @webpod/ps && \
  echo "import ps from '@webpod/ps';\nconsole.log(ps);" > index.ts && \
  pnpm tsc --noEmit

Error

index.ts:1:16 - error TS7016:
Could not find a declaration file for module '@webpod/ps'. '/example-webpod-types/node_modules/.pnpm/@[email protected]/node_modules/@webpod/ps/target/cjs/index.cjs' implicitly has an 'any' type.
There are types at '/example-webpod-types/node_modules/@webpod/ps/target/dts/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
@petertonysmith94 petertonysmith94 linked a pull request Dec 1, 2024 that will close this issue
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 a pull request may close this issue.

1 participant