Skip to content

Import statement failed for @azure/identity javascript module #33336

@sahuroshan

Description

@sahuroshan
  • Package Name:
  • @azure/identity
  • Package Version:
  • ^4.7.0
  • Operating system:
  • nodejs
    • version:
    • v20.18.0
  • browser
    • edge

Describe the bug
Error while creating instance of DefaultAzureCredential using @azure/identity module.

import statement - import { DefaultAzureCredential } from "@azure/identity";

code causing this error - const creds = new DefaultAzureCredential();

Error - "https://localhost:1339/DmsAzurePortalExtension/Content/5.1.0.0/Scripts/DmsV2/Wizards/OfflineBlobMigrationSettingsTabBase.js" as the following dependencies failed to load; ["@azure/identity" : {Error: Couldn't load "@azure/identity"; error code 500}];}];}];}];

Additional context
tsconfig -
{
"compileOnSave": true,
"compilerOptions": {
"alwaysStrict": true,
"moduleResolution": "node",
"baseUrl": "Client",
"composite": true,
"skipLibCheck": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"inlineSources": true,
"module": "amd",
"noEmitHelpers": true,
"noImplicitAny": true,
"noImplicitThis": true,
"outDir": "Output/Content/Scripts",
"paths": {
"": [
"
"
]
},
"removeComments": false,
"rootDir": "Client",
"sourceMap": true,
"target": "es5",
"lib": [
"dom",
"es2015.promise",
"es5",
"scripthost",
"es2016"
]
},
"include": [
"Client/**/",
"ForExport/
"
]
}

package.json-
{
"name": "dmsazureportalextension",
"version": "1.0.0",
"description": "dev scripts in script property",
"scripts": {
"refreshVSToken": "vsts-npm-auth -config .npmrc",
"restore": "ap restore",
"build": "ap build",
"serve": "ap serve",
"start": "ap start",
"watch": "ap watch",
"release": "ap release",
"lint": "ap lint"
},
"author": "Microsoft",
"license": "MIT",
"dependencies": {
"@azure/identity": "^4.7.0",
"@types/node": "^22.13.10"
}
}

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions