You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are all your remix dependencies & dev-dependencies using the same version?
Yes
Steps to Reproduce
npx create-remix@latest remix-tsc-latest # Just the basics, Remix App Server, TypeScript, Yescd remix-tsc-latest/
npm run typecheck
Also verify that the issue remains in the next version:
npx create-remix@pre remix-tsc-pre # Yes, Yescd remix-tsc-pre/
npm run typecheck
Expected Behavior
No type errors in a new project.
Actual Behavior
Remix seems to start with a couple type errors:
> typecheck
> tsc
node_modules/@remix-run/node/dist/fetch.d.ts:15:9 - error TS2416: Property 'headers' in type 'NodeRequest' is not assignable to the same property in base type 'Request'.
Property 'getSetCookie' is missing in type 'import("/tmp/remix-tsc-latest/node_modules/@remix-run/web-fetch/dist/src/headers").default' but required in type 'Headers'.
15 get headers(): WebHeaders;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:13447:5
13447 getSetCookie(): string[];
~~~~~~~~~~~~~~~~~~~~~~~~~
'getSetCookie' is declared here.
node_modules/@remix-run/node/dist/fetch.d.ts:16:5 - error TS2416: Property 'clone' in type 'NodeRequest' is not assignable to the same property in base type 'Request'.
Type '() => NodeRequest' is not assignable to type '() => Request'.
Call signature return types 'NodeRequest' and 'Request' are incompatible.
The types of 'headers' are incompatible between these types.
Type 'import("/tmp/remix-tsc-latest/node_modules/@remix-run/web-fetch/dist/src/headers").default' is not assignable to type 'Headers'.
16 clone(): NodeRequest;
~~~~~
node_modules/@remix-run/node/dist/fetch.d.ts:19:9 - error TS2416: Property 'headers' in type 'NodeResponse' is not assignable to the same property in base type 'Response'.
Type 'import("/tmp/remix-tsc-latest/node_modules/@remix-run/web-fetch/dist/src/headers").default' is not assignable to type 'Headers'.
19 get headers(): WebHeaders;
~~~~~~~
node_modules/@remix-run/node/dist/fetch.d.ts:20:5 - error TS2416: Property 'clone' in type 'NodeResponse' is not assignable to the same property in base type 'Response'.
Type '() => NodeResponse' is not assignable to type '() => Response'.
Call signature return types 'NodeResponse' and 'Response' are incompatible.
The types of 'headers' are incompatible between these types.
Type 'import("/tmp/remix-tsc-latest/node_modules/@remix-run/web-fetch/dist/src/headers").default' is not assignable to type 'Headers'.
20 clone(): NodeResponse;
~~~~~
node_modules/@remix-run/node/dist/upload/fileUploadHandler.d.ts:47:22 - error TS2420: Class 'NodeOnDiskFile' incorrectly implements interface 'File'.
Property 'prototype' is missing in type 'NodeOnDiskFile' but required in type 'File'.
47 export declare class NodeOnDiskFile implements File {
~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:3124:5
3124 prototype: Blob;
~~~~~~~~~
'prototype' is declared here.
node_modules/@remix-run/web-fetch/dist/src/headers.d.ts:19:22 - error TS2420: Class 'import("/tmp/remix-tsc-latest/node_modules/@remix-run/web-fetch/dist/src/headers").default' incorrectly implements interface 'Headers'.
Property 'getSetCookie' is missing in type 'import("/tmp/remix-tsc-latest/node_modules/@remix-run/web-fetch/dist/src/headers").default' but required in type 'Headers'.
19 export default class Headers extends URLSearchParams implements globalThis.Headers {
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:13447:5
13447 getSetCookie(): string[];
~~~~~~~~~~~~~~~~~~~~~~~~~
'getSetCookie' is declared here.
node_modules/@types/glob/index.d.ts:29:42 - error TS2694: Namespace '"/tmp/remix-tsc-latest/node_modules/minimatch/dist/cjs/index"' has no exported member 'IOptions'.
29 interface IOptions extends minimatch.IOptions {
~~~~~~~~
node_modules/@types/glob/index.d.ts:74:30 - error TS2724: '"/tmp/remix-tsc-latest/node_modules/minimatch/dist/cjs/index"' has no exported member named 'IMinimatch'. Did you mean 'Minimatch'?
74 minimatch: minimatch.IMinimatch;
~~~~~~~~~~
Found 8 errors in 4 files.
Errors Files
4 node_modules/@remix-run/node/dist/fetch.d.ts:15
1 node_modules/@remix-run/node/dist/upload/fileUploadHandler.d.ts:47
1 node_modules/@remix-run/web-fetch/dist/src/headers.d.ts:19
2 node_modules/@types/glob/index.d.ts:29
The text was updated successfully, but these errors were encountered:
What version of Remix are you using?
latest, also verified in pre
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Also verify that the issue remains in the next version:
Expected Behavior
No type errors in a new project.
Actual Behavior
Remix seems to start with a couple type errors:
The text was updated successfully, but these errors were encountered: