solid-start: Typescript `tsc` can not exclude `node_modules/solid-start/`
When running the tsc
command at a new created project root, I got the following error messages. Even I have already added "skipLibCheck": true
and "exclude": ["node_modules"]
to tsconfig.json
. Is it something with "types": ["vite/client"]
?
...
Found 5 errors in 4 files.
Errors Files
2 node_modules/solid-start/entry-client/StartClient.tsx:3
1 node_modules/solid-start/entry-server/StartServer.tsx:5
1 node_modules/solid-start/islands/server-router.tsx:126
1 node_modules/solid-start/types.ts:14
New project created via:
npm init solid@next
✔ Which template do you want to use? › bare
✔ Server Side Rendering? … yes
✔ Use TypeScript? … yes
version: v0.1.0-alpha.99
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 11
- Comments: 20 (9 by maintainers)
Unfortunately, there are still some JS parts of solid-start that need to be converted before we can switch to full strict.
My workaround is to use https://www.npmjs.com/package/tsc-silent:
I think #1228 (which is talking about the way - creating the .d.ts instead of exposing .ts - to solve this issue) could be a new place for talking about this.
@ryansolid this issue should be re-opened
I’m currently working around this with https://www.npmjs.com/package/patch-package. This is my current
patches/solid-start+0.2.6.patch
file:Two takeaways:
solid-start
use strict types? I’m using this as my base tsconfig: https://github.com/tsconfig/bases/blob/fcb68ce91474c5569a8892c638426d53a431b9eb/bases/node18-strictest-esm.combined.json (via"extends": "@tsconfig/node18-strictest-esm/tsconfig.json"
)solid-start
only shipped.js
and.d.ts
files, that wayskipLibCheck
could work properly.@nirtamir2 here is my workaround, I hope this helps. package.json
add-ts-nocheck.cjs
yes, solid-start contains a lot of ts errors, maybe the developer didn’t use tsc to compile the code. 🤦♂️