kit
kit copied to clipboard
[pnpm] Missing Modules in index.d.ts
Describe the bug
When using pnpm, I ran into an issue with my inferred types with use:enhance result callback and noticed that there was missing modules in my node_modules/@sveltejs/kit/types/index.d.ts
With a fresh install using pnpm, I am able to reproduce the errors
But not when using npm, there are no errors in node_modules/@sveltejs/kit/types/index.d.ts
declare module '@sveltejs/kit'
Definitions of the following identifiers conflict with those in another file: ActionFailure, AwaitedProperties, AwaitedActions, Handle, HandleServerError, HandleClientError, HandleFetch, Load, NavigationType, ParamMatcher, RequestHandler, Server, ServerLoad, Action, Actions, ActionResult, HttpError, Redirect, SubmitFunction, ActionSource, BaseSource, CryptoSource, FrameSource, HostNameScheme, HostSource, HostProtocolSchemes, HttpDelineator, PortScheme, SchemeSource, Source, Sources, UriPath, HttpMethod, MaybePromise, PrerenderHttpErrorHandlerValue, PrerenderMissingIdHandlerValue, PrerenderEntryGeneratorMismatchHandlerValue, PrerenderOption, PrerenderMap, TrailingSlash, vitePreprocess, browser, dev, building, version, disableScrollHandling, goto, invalidate, invalidateAll, preloadData, preloadCode, beforeNavigate, afterNavigate, base, assets, page, navigating, updated, build, files, prerendered, relative
import type { PluginOptions } from '@sveltejs/vite-plugin-svelte';
Cannot find module '@sveltejs/vite-plugin-svelte' or its corresponding type declarations.
Reproduction
pnpm create svelte@latest my-app
https://github.com/hjaber/my-app
Logs
No response
System Info
System:
OS: macOS 13.4
CPU: (8) arm64 Apple M2
Memory: 7.02 GB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - /usr/local/bin/node
npm: 9.6.7 - /usr/local/bin/npm
Browsers:
Brave Browser: 113.1.51.118
Safari: 16.5
npmPackages:
@sveltejs/adapter-auto: ^2.0.0 => 2.1.0
@sveltejs/kit: ^1.5.0 => 1.20.0
svelte: ^3.54.0 => 3.59.1
vite: ^4.3.0 => 4.3.9
Severity
annoyance
Additional Information
No response