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
Stricter tsconfig.json options generate tsc errors in @clerk/backend-core #326
Comments
Hello @mkitt, many thanks for the detailed description :) The latest |
Closing this one, but please feel free to ping us again if its needed :) |
Sorry for the delayed response but I'm still seeing errors reported from |
No worries, thanks for reporting back! It'd be great if you could share a snippet containing the reported errors as I'm not able to reproduce this one anymore locally using the tsconfig you provided. In the meantime, setting |
Here's the error output from
and here's that tsconfig which does have {
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"strict": true,
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},
"exactOptionalPropertyTypes": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
// Remix takes care of building everything in `remix build`.
"noEmit": true
}
} |
Same issue here. pnpm 7.15.0 tsconfig {
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": ["./app/@types/*"],
"~/*": ["./app/*"]
},
"skipLibCheck": true,
"composite": false,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"moduleResolution": "node",
"preserveWatchOutput": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"importsNotUsedAsValues": "error",
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"isolatedModules": true,
"jsx": "react-jsx",
"resolveJsonModule": true,
"target": "ES2019",
"allowJs": true,
// Remix takes care of building everything in `remix build`.
"noEmit": true
}
} tsc result```shell > tsc --noEmit../../node_modules/.pnpm/@clerk+backend-core@2.8.1/node_modules/@clerk/backend-core/src/api/ClerkBackendApi.ts:4:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. 4 import { APIClient, APIRequestOptions } from './endpoints';
../../node_modules/.pnpm/@clerk+backend-core@2.8.1/node_modules/@clerk/backend-core/src/api/endpoints/ClientApi.ts:2:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. 2 import { Client } from '../resources/Client';
../../node_modules/.pnpm/@clerk+backend-core@2.8.1/node_modules/@clerk/backend-core/src/api/endpoints/OrganizationApi.ts:2:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. 2 import { Organization, OrganizationInvitation, OrganizationMembership } from '../resources';
|
Provide the Frontend API key from your application dashboard.Package + Version
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/clerk-expo
@clerk/backend-core
@clerk/clerk-sdk-node
@clerk/edge
Version:
Browser/OS
GitHub Actions — ubuntu-latest, macOS locally in development
Description
Following the setup instructions from the "Getting started" section in the
clerkinc/remix-auth-starter
repository and adding the following stricter settings to the tsconfig.json file:Then run:
This will produce a number of errors originating from:
It seems like we should be able to apply these stricter options in our application's tsconfig.json without it leaking into the Clerk library to produce these errors? I haven't seen this in other libraries our application consumes with these same options applied. The only workaround I've found is to remove these options to match the standards set by the Clerk library.
The addition of
skipLibCheck
is the workaround from #155 which also feels like an option we also shouldn't have to supply in the tsconfig.json.Related or Similar:
🙌 Thanks in advance and let me know if I can provide any other information.
The text was updated successfully, but these errors were encountered: