Skip to content

tsgo on SvelteKit project reporting more issues than tsc #2185

@KieranP

Description

@KieranP

Steps to reproduce

Have a SvelteKit application using Prisma ORM. Setup tsc and tsgo side-by-side.

tsc reports no issues, tsgo reports 4 errors.

It could be either because tsgo is picking up hidden .svelte-kit folder where tsc didn't previously?

Or some type of incompatibility with the way pnpm structures the node_modules folder?

Behavior with [email protected]

› pnpm tsc --noEmit

(no output, i.e no errors or warnings)

Behavior with tsgo

› pnpm tsgo --noEmit
.svelte-kit/types/src/routes/clients/[id]/edit/proxy+page.server.ts:16:14 - error TS2742: The inferred type of 'load' cannot be named without a reference to '.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/.prisma/client'. This is likely not portable. A type annotation is necessary.

16 export const load = async ({ params, locals }: Parameters<PageServerLoad>[0]) => {
                ~~~~

.svelte-kit/types/src/routes/clients/[id]/proxy+page.server.ts:8:14 - error TS2742: The inferred type of 'load' cannot be named without a reference to '.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/.prisma/client'. This is likely not portable. A type annotation is necessary.

8 export const load = async ({ params, locals }: Parameters<PageServerLoad>[0]) => {
               ~~~~

.svelte-kit/types/src/routes/clients/[id]/terms/proxy+page.server.ts:8:14 - error TS2742: The inferred type of 'load' cannot be named without a reference to '.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/.prisma/client'. This is likely not portable. A type annotation is necessary.

8 export const load = async ({ params, locals }: Parameters<PageServerLoad>[0]) => {
               ~~~~

.svelte-kit/types/src/routes/proxy+page.server.ts:6:14 - error TS2742: The inferred type of 'load' cannot be named without a reference to '.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/.prisma/client'. This is likely not portable. A type annotation is necessary.

6 export const load = async ({ locals }: Parameters<PageServerLoad>[0]) => {
               ~~~~


Found 4 errors in 4 files.

Errors  Files
     1  .svelte-kit/types/src/routes/clients/[id]/edit/proxy+page.server.ts:16
     1  .svelte-kit/types/src/routes/clients/[id]/proxy+page.server.ts:8
     1  .svelte-kit/types/src/routes/clients/[id]/terms/proxy+page.server.ts:8
     1  .svelte-kit/types/src/routes/proxy+page.server.ts:6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions