1

i was working on a project , after i upgraded the angular version i started getting this error can anyone please help me determine this error ?
i have tried deleting node_modules,package-lock.json and reinstalling angular and cli but not able to fix this.
npm start gives me this error
An unhandled exception occurred: Cannot find module 'webpack' Require stack:

  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\build-webpack\src\webpack\index.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\build-webpack\src\index.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\build-angular\src\dev-server\index.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\architect\node\node-modules-architect-host.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\architect\node\index.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\models\architect-command.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\commands\serve-impl.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\schematics\tools\export-ref.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular-devkit\schematics\tools\index.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\utilities\json-schema.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\models\command-runner.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\lib\cli\index.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\lib\init.js
  • C:\Users\HP\Desktop\New folder\gitlab repos\lms-dashboard\node_modules@angular\cli\bin\ng See "C:\Users\HP\AppData\Local\Temp\ng-9d5ZFx\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 --port 4201
    npm ERR! spawn ENOENT
    npm ERR! npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Roaming\npm-cache_logs\2020-11-27T06_17_52_442Z-debug.log
package.json

{
  "name": "scssdestmoney",
  "version": "1.0.0",
  "license": "MIT",
  "scripts": {
    "build-prod": "bash ./scripts/ng.sh build --prod --aot --env=prod",
    "ng": "ng",
    "start": "ng serve --port 4201",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.4.7",
    "@angular/common": "^4.4.7",
    "@angular/compiler": "^4.4.7",
    "@angular/core": "^4.4.7",
    "@angular/forms": "^4.4.7",
    "@angular/http": "^4.4.7",
    "@angular/material": "^11.0.1",
    "@angular/platform-browser": "^4.4.7",
    "@angular/platform-browser-dynamic": "^4.4.7",
    "@angular/router": "^4.4.7",
    "@types/selenium-webdriver": "2.53.33",
    "@zoomus/websdk": "^1.8.0",
    "angular-material": "^1.2.1",
    "angular2-jwt": "^0.2.2",
    "animate.css": "3.5.2",
    "async": "^3.2.0",
    "binding": "^3.0.3",
    "chart.js": "^2.7.3",
    "core-js": "^2.5.7",
    "dateformat": "^3.0.3",
    "font-awesome": "4.7.0",
    "jquery": "3.1.1",
    "ng-socket-io": "^0.2.4",
    "ng2-charts": "^1.6.0",
    "node-sass": "^4.13.0",
    "primeicons": "^1.0.0",
    "primeng": "^4.3.0",
    "protractor": "^5.4.2",
    "rxjs": "^5.5.12",
    "websdk": "^3.0.0",
    "wowjs": "1.1.3",
    "xlsx": "^0.14.2",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1100.2",
    "@angular/cli": "^11.0.2",
    "@angular/compiler-cli": "^4.4.7",
    "@angular/language-service": "^4.4.7",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "^2.0.6",
    "@types/node": "^6.14.5",
    "codelyzer": "~3.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.4.3",
    "karma-jasmine": "^1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.3.2",
    "typescript": "^2.3.4"
  }
}
2
  • can you post your package.json ? Commented Nov 27, 2020 at 6:25
  • updated the package.json above Commented Nov 27, 2020 at 6:39

2 Answers 2

1

Try to just install it with npm install webpack

Sign up to request clarification or add additional context in comments.

Comments

0

Try to install npm install and check whether the project is getting build if its still not working

Try npm update

Comments

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.