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
I'm building a node backend with TypeScript and I cannot compile the project after installing node-auth0 because it cannot find declarations for RequestInfo and RequestCredentials within node-auth0/src/lib/models.ts.
I was able to work around this by creating a type declaration file in my project like so
import*asundici_typesfrom"undici-types";declare global {typeRequestInfo=undici_types.RequestInfo;typeRequestCredentials=undici_types.RequestCredentials;}
I'm not sure if the issue is with undici-types or with auth0 but I was breaking too much other stuff when I tried to fix this within auth0.
node_modules/auth0/dist/cjs/lib/models.d.ts:6:36 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?
6 export type FetchAPI = (url: URL | RequestInfo, init?: RequestInit) => Promise<Response>;
~~~~~~~~~~~
node_modules/auth0/dist/cjs/lib/models.d.ts:60:19 - error TS2304: Cannot find name 'RequestCredentials'.
60 credentials?: RequestCredentials;
~~~~~~~~~~~~~~~~~~
node_modules/auth0/dist/cjs/lib/models.d.ts:99:16 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?
99 url: URL | RequestInfo;
~~~~~~~~~~~
node_modules/auth0/dist/cjs/lib/models.d.ts:104:16 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?
104 url: URL | RequestInfo;
~~~~~~~~~~~
node_modules/auth0/dist/cjs/lib/models.d.ts:109:16 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?
109 url: URL | RequestInfo;
~~~~~~~~~~~
node_modules/auth0/dist/cjs/lib/models.d.ts:115:16 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?
115 url: URL | RequestInfo;
~~~~~~~~~~~
Found 6 errors in the same file, starting at: node_modules/auth0/dist/cjs/lib/models.d.ts:6
Additional context
No response
node-auth0 version
4.18.0
Node.js version
22.2.0
The text was updated successfully, but these errors were encountered:
Checklist
Description
I'm building a node backend with TypeScript and I cannot compile the project after installing
node-auth0
because it cannot find declarations forRequestInfo
andRequestCredentials
withinnode-auth0/src/lib/models.ts
.I was able to work around this by creating a type declaration file in my project like so
I'm not sure if the issue is with
undici-types
or withauth0
but I was breaking too much other stuff when I tried to fix this withinauth0
.Reproduction
tsconfig.json
package.json
src/index.ts
npm install && npm run build
Errors
Additional context
No response
node-auth0 version
4.18.0
Node.js version
22.2.0
The text was updated successfully, but these errors were encountered: