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

svelte-check includes some node modules when running on pnpm #2164

Closed
emilaleksanteri opened this issue Sep 21, 2023 · 5 comments
Closed

svelte-check includes some node modules when running on pnpm #2164

emilaleksanteri opened this issue Sep 21, 2023 · 5 comments
Labels
question Further information is requested

Comments

@emilaleksanteri
Copy link

Describe the bug

When I run svelte-kit sync && svelte-check --tsconfig ./tsconfig.json i get type errors on some node modules for some reason.

My dependencies:
"dependencies": { "@auth/core": "^0.9.0", "@auth/sveltekit": "^0.3.3", "@auth/typeorm-adapter": "^1.0.1", "@googlemaps/js-api-loader": "^1.15.1", "@rgossiaux/svelte-heroicons": "^0.1.2", "@sendgrid/mail": "^7.7.0", "@tsndr/cloudflare-worker-jwt": "^2.2.1", "typeorm": "^0.3.17", "wrangler": "^3.3.0", "zod": "^3.21.4" }, "devDependencies": { "@babel/core": ">=7.10.2 <8.0.0", "@playwright/test": "^1.36.2", "@rgossiaux/svelte-headlessui": "^1.0.2", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-cloudflare": "^2.3.1", "@sveltejs/kit": "^1.22.3", "@tanstack/svelte-query": "^4.24.4", "@trpc/client": "^10.11.1", "@trpc/server": "^10.11.1", "@types/google.maps": "^3.52.4", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", "autoprefixer": "^10.4.13", "cross-env": "^7.0.3", "eslint": "^8.33.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-svelte3": "^4.0.0", "install": "^0.13.0", "postcss": "^8.4.21", "postcss-load-config": "^4.0.1", "prettier": "^2.8.4", "prettier-plugin-packagejson": "^2.4.2", "prettier-plugin-svelte": "^2.9.0", "prettier-plugin-tailwindcss": "^0.2.2", "svelte": "^4.0.5", "svelte-check": "^3.5.2", "svelte-preprocess": "^5.0.1", "tailwindcss": "^3.2.6", "trpc-sveltekit": "^3.2.9", "tslib": "^2.5.0", "typescript": "^5.1.6", "typescript-svelte-plugin": "^0.3.33", "vite": "^4.1.1", "vitest": "^0.28.4" },

My ts config is:
{ "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { "allowJs": true, "checkJs": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "plugins": [ { "name": "typescript-svelte-plugin" } ] } // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias // // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes // from the referenced tsconfig.json - TypeScript does not merge them in }

example of one of the errors:
node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/src/index.ts:55:10

Reproduction

Running svelte-kit sync && svelte-check --tsconfig ./tsconfig.json with my config

Expected behaviour

To not get type errors from node modules

System Info

OS: EndeavourOS Linux x86_64
Host: ROG Zephyrus G14 GA401IU_GA401IU 1.0
Kernel: 6.4.12-arch1-1
CPU: AMD Ryzen 7 4800HS with Radeon Graphics (16) @ 2.900GHz
GPU: AMD ATI 04:00.0 Renoir
GPU: NVIDIA GeForce GTX 1660 Ti Mobile
Shell: bash 5.1.16

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

@emilaleksanteri emilaleksanteri added the bug Something isn't working label Sep 21, 2023
@jasonlyu123
Copy link
Member

Please provide a reproduction in a repository form.

@emilaleksanteri
Copy link
Author

Please provide a reproduction in a repository form.

This might actually be some sort a config conflict related error on our at work repo because i'm unable to recreate it any other repo w the same config, my bad

@jasonlyu123
Copy link
Member

It usually is because skipLibCheck is set to false (the default). Maybe you can check if there is anything that overrides this config.

@emilaleksanteri
Copy link
Author

It usually is because skipLibCheck is set to false (the default). Maybe you can check if there is anything that overrides this config.

Will do, thank you!

@emilaleksanteri
Copy link
Author

It usually is because skipLibCheck is set to false (the default). Maybe you can check if there is anything that overrides this config.

This was pretty much the error, so all fixed now microsoft/TypeScript#40426 (comment)

@dummdidumm dummdidumm added question Further information is requested and removed bug Something isn't working awaiting submitter labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants