Skip to content
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

Compilation error 'AADServerParamKeys' is not exported from '@azure/msal-common/browser' #7396

Closed
2 tasks
BasSchoutenTribe opened this issue Oct 30, 2024 · 6 comments
Labels
bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@BasSchoutenTribe
Copy link

BasSchoutenTribe commented Oct 30, 2024

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.26.1

Wrapper Library

Not Applicable

Wrapper Library Version

N/a

Public or Confidential Client?

Public

Description

I'm trying to use the msal-browser functionality im our project to have access to Graph in our Outlook addin
When I add the package and try to use it by calling createNestablePublicClientApplication() I get a compile error

Using node 14.17.4

I cannot find any node requirements for this package

const pca = await createNestablePublicClientApplication({
            auth: {
                clientId: "...",
                authority: "https://login.microsoftonline.com/common"
            },
        });

Error Message

./node_modules/@azure/msal-browser/dist/interaction_client/NativeInteractionClient.mjs
Attempted import error: 'AADServerParamKeys' is not exported from '@azure/msal-common/browser'.

MSAL Logs

N/A

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

N/A

Relevant Code Snippets

package.json:

  "dependencies": {
    ...
    "@azure/msal-browser": "^3.26.1"
	...
import { createNestablePublicClientApplication } from '@azure/msal-browser';
...
const pca = await createNestablePublicClientApplication({
            auth: {
                clientId: "...",
                authority: "https://login.microsoftonline.com/common"
            },
        });

Reproduction Steps

N/A

Expected Behavior

No compile error

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Chrome

Regression

No response

@BasSchoutenTribe BasSchoutenTribe added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Oct 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Oct 30, 2024
@github-actions github-actions bot added msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Oct 30, 2024
@BasSchoutenTribe
Copy link
Author

Also tried with Node 16 with same result

@yilinsim
Copy link

Also seeing a similar issue when attempting to upgrade @azure/msal-browser from v2 to v3.

Error message

.../node_modules/.pnpm/@azure+msal-browser@3.26.1/node_modules/@azure/msal-browser/dist/interaction_client/NativeInteractionClient.mjs
Can't import the named export 'AADServerParamKeys' from non EcmaScript module (only default export is available)

Node version: v20.14.0
Webpack version: v4.47.0
@azure/msal-browser version: v3.23.0 (using any newer version resulted in another typing issue)

What I tried:

Both attempts were unsuccessful. Not entirely sure if it's exactly the same issue but seems like it could be related.

@konstantin-msft
Copy link
Collaborator

@BasSchoutenTribe Can you please try building with node 18 or above? Older versions of node are not supported by MSAL.js v3.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Oct 31, 2024
@BasSchoutenTribe
Copy link
Author

Sorry, but it is not possible on the short term to port our app to node18, too many dependencies that don't support that
Is there a version of MSAL that does support node version < 18?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Oct 31, 2024
@konstantin-msft
Copy link
Collaborator

Please try LTS SDK: msal-browser@^2.39.0

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Oct 31, 2024
@BasSchoutenTribe
Copy link
Author

At least that compiles ...

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Oct 31, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

3 participants