@azure/msal-node npm build run fails with loader problems

Ragasudha Vadla 1 Reputation point
2022-09-15T12:42:20.263+00:00

I'm trying to migrate ADAL TO MSAL in Angular. As part of migration for ConfidentialClientApplication, I have installed @azure/msal-node module and when I try to build my application I'm getting the below build error.

ERROR in ./node_modules/@azure/msal-node/dist/msal-node.esm.js
Module parse failed: Invalid regular expression flag (226:60)
You may need an appropriate loader to handle this file type.

241459-image.png

Package.json

  "private": true,  
  "dependencies": {  
    "@angular/animations": "^5.2.0",  
    "@angular/common": "^5.2.0",  
    "@angular/compiler": "^5.2.0",  
    "@angular/core": "^5.2.0",  
    "@angular/forms": "^5.2.0",  
    "@angular/http": "^5.2.0",  
    "@angular/platform-browser": "^5.2.0",  
    "@angular/platform-browser-dynamic": "^5.2.0",  
    "@angular/router": "^5.2.0",  
    "@azure/msal-angular": "^2.3.3",  
    "@azure/msal-browser": "^2.28.0",  
    "@azure/msal-node": "^1.13.0",  
    "@markpieszak/ng-application-insights": "^5.0.1",  
    "@ng-idle/core": "^2.0.0-beta.15",  
    "@ng-idle/keepalive": "^2.0.0-beta.15",  
    "@types/datatables.net": "^1.10.9",  
    "@types/jquery": "^3.3.1",  
    "angular-datatables": "^5.0.0",  
    "angular2-uuid": "^1.1.1",  
    "bootstrap": "3.3.0",  
    "classlist.js": "^1.1.20150312",  
    "core-js": "^2.4.1",  
    "datatables.net": "^1.10.22",  
    "datatables.net-dt": "^1.10.22",  
    "ng-multiselect-dropdown": "^0.2.1",  
    "ng2-adal": "^2.0.0",  
    "ng2-appinsights": "^1.0.0-beta.1",  
    "ng2-search-filter": "^0.4.7",  
    "ng4-loading-spinner": "^1.1.3",  
    "ngx-bootstrap": "^2.0.4",  
    "rxjs": "^5.5.6",  
    "zone.js": "^0.8.19"  
  },  
  "devDependencies": {  
    "@angular/cli": "~1.7.4",  
    "@angular/compiler-cli": "^5.2.0",  
    "@angular/language-service": "^5.2.0",  
    "@types/jasmine": "~2.8.3",  
    "@types/jasminewd2": "~2.0.2",  
    "@types/node": "~6.0.60",  
    "codelyzer": "^4.0.1",  
    "jasmine-core": "~2.8.0",  
    "jasmine-spec-reporter": "~4.2.1",  
    "karma": "~2.0.0",  
    "karma-chrome-launcher": "~2.2.0",  
    "karma-coverage-istanbul-reporter": "^1.2.1",  
    "karma-jasmine": "~1.1.0",  
    "karma-jasmine-html-reporter": "^0.2.2",  
    "protractor": "~5.1.2",  
    "ts-node": "~4.1.0",  
    "tslint": "~5.9.1",  
    "typescript": "^3.8.3"  
  }  
}  
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,211 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nia Valeria 0 Reputation points
    2024-01-24T09:48:52.5233333+00:00

    Hi, I have similar issue after implementing @azure/msal-react & @azure/msal-browser. How to solve this?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.