florian-lefebvre/astro-integration-kit

After adding from npm, the type is not identified.

Closed this issue · 6 comments

ktym4a commented

When using devtool in a workspace, typescript type inference works correctly, but type inference does not work after adding from npm

this one is in a workspace.
workspace


this one is added from npm
npm

Is the repo public? Without the code, a bit hard to say!

I'll have a look at it later today

Looking at this repro (https://stackblitz.com/edit/withastro-astro-cag46f?file=astro.config.mjs), it seems that this does not occur with all package managers:

  • pnpm: works
  • npm: broken
  • yarn: unknown
ktym4a commented

I tested and seems that

  • pnpm: works
  • npm: broken
  • yarn: broken

@Princesseuh do you know why that happens? I guess I must be missing some fields in package.json? https://github.com/florian-lefebvre/astro-integration-template/blob/main/package/package.json