1

I added something under "Resolutions" in my package.json file to resolve some vulnerabilities. Running npm install and npm run build works fine as expected. However after running npm run start command, I get the following error:

Your global Angular CLI version (12.2.18) is greater than your local version (12.2.17). The local Angular CLI version is used.
    
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
- Generating browser application bundles (phase: setup)...An unhandled exception occurred: webpack_dev_server_1.default.addDevServerEntrypoints is not a function
  See "C:\Users\330\AppData\Local\Temp\ng-FEY8TL\angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! [email protected] start: `ng serve`
npm ERR!
npm ERR! Failed at the [email protected] start script.

I am not sure if this is a compatibility issue between webpack's dev server and my Angular version. I tried deleting node_modules and package-lock.json and ran npm install afterwards. It gave me no luck, I got more errors.

I am a beginner at angular and nest.js in general.

Here is my package.json file:

{
  "dependencies": {
    "@angular/animations": "~12.2.0",
    "@angular/cdk": "^12.2.13",
    "@angular/common": "~12.2.0",
    "@angular/compiler": "~12.2.0",
    "@angular/core": "~12.2.0",
    "@angular/forms": "~12.2.0",
    "@angular/material": "^12.2.13",
    "@angular/platform-browser": "~12.2.0",
    "@angular/platform-browser-dynamic": "~12.2.0",
    "@angular/router": "~12.2.0",
    "@rig/common": "4.4.1",
    "@rig/ng-core-components": "4.4.1",
    "@rig/ng-core-navigation": "^4.3.0",
    "@rig/pcb-web-theme": "4.1.0",
    "@rig/styles": "4.4.0",
    "colortranslator": "^1.9.3",
    "rxjs": "~6.6.0",
    "tslib": "^2.3.0",
    "xml-formatter": "^2.6.1",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-builders/jest": "^15.0.0",
    "@angular-devkit/build-angular": "~12.2.18",
    "@angular/cli": "~12.2.16",
    "@angular/compiler-cli": "~12.2.0",
    "@types/jasmine": "~3.8.0",
    "@types/jest": "^29.2.4",
    "@types/node": "^18.11.17",
    "jasmine-core": "~3.8.0",
    "jest": "^29.3.1",
    "jest-environment-jsdom": "^29.3.1",
    "jest-junit": "^15.0.0",
    "jest-preset-angular": "12.2.3",
    "jest-sonar-reporter": "^2.0.0",
    "loader-utils": "^2.0.4",
    "moment": "2.29.4",
    "prettier": "^1.19.1",
    "ts-jest": "^29.0.3",
    "typescript": "~4.3.5",
    "webpack-dev-server": "4.11.1",
    "html-loader": "4.2.0"
  },
  "jest": {
    "preset": "jest-preset-angular",
    "setupTestFrameworkScriptFile": "<rootDir>/setupJest.ts"
  },
  "jestSonar": {
    "reportPath": "../coverage"
  },
  "resolutions": {
    "webpack-dev-server": "4.11.1",
    "loader-utils": "^2.0.4",
    "babel-loader": "8.2.5",
    "json5": "2.2.2",
    "minimatch": "3.0.5",
    "glob-parent": "6.0.2",
    "http-cache-semantics": "4.1.1",
    "webpack": "5.76.0",
    "webpack-sources": "^3.2.3",
    "ejs": "3.1.9",
    "tough-cookie": "4.1.3",
    "semver": "7.5.2",
    "escodegen": "2.1.0",
    "@babel/traverse": "7.23.2"
  }
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.