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
When building a package with Auth.js installed as a dependency, there are multiple errors with @auth/core:
node_modules/@auth/core/lib/utils/cookie.d.ts:1:45 - error TS2305: Module '"../../types.js"' has no exported member 'RequestInternal'.
1 import type { CookieOption, LoggerInstance, RequestInternal } from "../../types.js";
~~~~~~~~~~~~~~~
node_modules/@auth/core/lib/utils/webauthn-utils.d.ts:2:48 - error TS2305: Module '"../../types.js"' has no exported member 'InternalOptions'.
2 import type { Account, Authenticator, Awaited, InternalOptions, RequestInternal, ResponseInternal, User } from "../../types.js";
~~~~~~~~~~~~~~~
node_modules/@auth/core/lib/utils/webauthn-utils.d.ts:2:65 - error TS2305: Module '"../../types.js"' has no exported member 'RequestInternal'.
2 import type { Account, Authenticator, Awaited, InternalOptions, RequestInternal, ResponseInternal, User } from "../../types.js";
~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:1:50 - error TS2307: Cannot find module 'nodemailer' or its corresponding type declarations.
1 import type { Transport, TransportOptions } from "nodemailer";
~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:2:32 - error TS2307: Cannot find module 'nodemailer/lib/json-transport/index.js' or its corresponding type declarations.
2 import * as JSONTransport from "nodemailer/lib/json-transport/index.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:3:36 - error TS2307: Cannot find module 'nodemailer/lib/sendmail-transport/index.js' or its corresponding type declarations.
3 import * as SendmailTransport from "nodemailer/lib/sendmail-transport/index.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:4:31 - error TS2307: Cannot find module 'nodemailer/lib/ses-transport/index.js' or its corresponding type declarations.
4 import * as SESTransport from "nodemailer/lib/ses-transport/index.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:5:27 - error TS2307: Cannot find module 'nodemailer/lib/smtp-pool/index.js' or its corresponding type declarations.
5 import * as SMTPPool from "nodemailer/lib/smtp-pool/index.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:6:32 - error TS2307: Cannot find module 'nodemailer/lib/smtp-transport/index.js' or its corresponding type declarations.
6 import * as SMTPTransport from "nodemailer/lib/smtp-transport/index.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/nodemailer.d.ts:7:34 - error TS2307: Cannot find module 'nodemailer/lib/stream-transport/index.js' or its corresponding type declarations.
7 import * as StreamTransport from "nodemailer/lib/stream-transport/index.js";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/oauth.d.ts:15:44 - error TS2552: Cannot find name 'EndpointHandler'. Did you mean 'TokenEndpointHandler'?
15 export type AuthorizationEndpointHandler = EndpointHandler<AuthorizationParameters>;
~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/oauth.d.ts:16:36 - error TS2552: Cannot find name 'EndpointHandler'. Did you mean 'TokenEndpointHandler'?
16 export type TokenEndpointHandler = EndpointHandler<UrlParams, {
~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/oauth.d.ts:30:39 - error TS2552: Cannot find name 'EndpointHandler'. Did you mean 'TokenEndpointHandler'?
30 export type UserinfoEndpointHandler = EndpointHandler<UrlParams, {
~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/oauth.d.ts:182:43 - error TS2552: Cannot find name 'OAuthConfigInternal'. Did you mean 'OIDCConfigInternal'?
182 export type OIDCConfigInternal<Profile> = OAuthConfigInternal<Profile> & {
~~~~~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/webauthn.d.ts:4:15 - error TS2305: Module '"../types.js"' has no exported member 'InternalOptions'.
4 import type { InternalOptions, RequestInternal, SemverString, User } from "../types.js";
~~~~~~~~~~~~~~~
node_modules/@auth/core/providers/webauthn.d.ts:4:32 - error TS2305: Module '"../types.js"' has no exported member 'RequestInternal'.
4 import type { InternalOptions, RequestInternal, SemverString, User } from "../types.js";
Note that isolatedModules has no effect on the errors.
Create some code, importing @auth/core— import type * as auth from '@auth/core'; is sufficient
Try to compile with npx tsc
Expected behavior
@auth/core should not have these issues.
Adding nodemailer and @hexagon/base64 to the dependencies should resolve the errors concerning missing dependencies.
As for the missing exports— these types are defined, however they appear to be missing in the build (i.e. in node_modules/@auth/core/types.{js,d.ts}).
The text was updated successfully, but these errors were encountered:
james-pre
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Apr 7, 2025
Environment
Reproduction URL
https://github.com/james-pre/axium/tree/main/server
Describe the issue
When building a package with Auth.js installed as a dependency, there are multiple errors with
@auth/core
:How to reproduce
npm init -y
npm install typescript @auth/core
Note that
isolatedModules
has no effect on the errors.@auth/core
—import type * as auth from '@auth/core';
is sufficientnpx tsc
Expected behavior
@auth/core
should not have these issues.Adding
nodemailer
and@hexagon/base64
to the dependencies should resolve the errors concerning missing dependencies.As for the missing exports— these types are defined, however they appear to be missing in the build (i.e. in
node_modules/@auth/core/types.{js,d.ts}
).The text was updated successfully, but these errors were encountered: