0

Has anyone seen this issue in Angular 11 - ng serve?

Require stack:

  • C:\Users\x\Desktop\codebase\app\node_modules\cli-cursor\index.js
  • C:\Users\x\Desktop\codebase\app\node_modules\ora\index.js
  • C:\Users\x\Desktop\codebase\app\node_modules@angular-devkit\build-angular\src\utils\spinner.js
  • C:\Users\x\Desktop\codebase\app\node_modules@angular-devkit\build-angular\src\utils\i18n-inlining.js
  • C:\Users\x\Desktop\codebase\app\node_modules@angular-devkit\build-angular\src\browser\index.js
  • C:\Users\x\Desktop\codebase\app\node_modules@angular-devkit\build-angular\src\dev-server\index.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\architect\node\node-modules-architect-host.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\architect\node\index.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\commands\serve-impl.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\tools\export-ref.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\tools\index.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\utilities\json-schema.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\lib\cli\index.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\lib\init.js
  • C:\Users\x\AppData\Roaming\npm\node_modules@angular\cli\bin\ng
7
  • I've tried cleaning node_modules, npm cache clean --force etc but no luck Commented Oct 21, 2021 at 9:35
  • Did you update or change any version? When did you encounter it like after installing some packages or update? Commented Oct 21, 2021 at 9:41
  • Yeah I was trying to upgrade 1 package. It didn't upgraded. After that I've tried to updated Angular CLI to latest 11 minor version. Commented Oct 21, 2021 at 9:43
  • Now I am back to original state, but this error just doesn't go away. I've installed 'restore-cursor' package but 'ng serve' complaints this now: An unhandled exception occurred: require() of ES Module C:\Users\x\Desktop\codebase\app\node_modules\restore-cursor\index.js from C:\Users\x\Desktop\codebase\app\node_modules\cli-cursor\index.js not supported. Commented Oct 21, 2021 at 9:45
  • 1
    It seems there is a version mismatch. Have you tried to install the previous stable version of restore-cursor? Commented Oct 21, 2021 at 9:47

1 Answer 1

1

Such issues are very common due to the version mismatch. When it occurs try to move back to the previous stable version and make sure all other versions should match with the other peer-dependencies.

Try to explicitly install restore-cursor :

npm i restore-cursor@last-stable-version-number --save 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.