Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: An unhandled exception occurred: Cannot find module 'npm-registry-client'

chuksAndre free asked 4 years ago


Hi guys,

i just installed bootstrap for angular fire project which i created. i followed the directions given at this link: https://mdbootstrap.com/docs/angular/getting-started/quick-start/

After installation, i ran an ng serve --o command, i got the following errors below:

An unhandled exception occurred: Cannot find module 'npm-registry-client' Require stack: - C:\angularfire\node_modules\angular-bootstrap-md\schematics\ng-add\index.js - C:\angularfire\node_modules\@angular-devkit\schematics\tools\export-ref.js - C:\angularfire\node_modules\@angular-devkit\schematics\tools\index.js - C:\angularfire\node_modules\@angular\cli\utilities\json-schema.js - C:\angularfire\node_modules\@angular\cli\models\command-runner.js - C:\angularfire\node_modules\@angular\cli\lib\cli\index.js - C:\Users\dell\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js - C:\Users\dell\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng See "C:\Users\dell\AppData\Local\Temp\ng-wB4EZK\angular-errors.log" for further details.

Please am i missing something? This is important and urgent.


Arkadiusz Idzikowski staff commented 4 years ago

We will take a closer look at that. For now please create new Angular project and configure MDB following instructions from this section (without using ng add):

https://mdbootstrap.com/docs/angular/getting-started/quick-start/#npm-installation.

As a workaround for now you can also try to install the 'npm-registry-client' package.


chuksAndre free commented 4 years ago

i just did run an "npm i npm-registry-client" and i got these errors:

ERROR in multi ./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css ./node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss ./node_modules/@fortawesome/fontawesome-free/scss/solid.scss ./node_modules/@fortawesome/fontawesome-free/scss/regular.scss ./node_modules/@fortawesome/fontawesome-free/scss/brands.scss ./node_modules/angular-bootstrap-md/assets/scss/bootstrap/bootstrap.scss ./node_modules/angular-bootstrap-md/assets/scss/mdb.scss ./node_modules/animate.css/animate.css ./src/styles.scss Module not found: Error: Can't resolve 'C:\angularfire\src\styles.scss' in 'C:\angularfire'


Arkadiusz Idzikowski staff commented 4 years ago

Please edit your first post and paste there the content of your package.json, app.module and angular.json files.

Make sure that you installed fortawesome and angular-bootstrap-md packages (you can check if the packages folders are available in the node_modules dir).

npm install angular-bootstrap-md @fortawesome/fontawesome-free --save


chuksAndre free commented 4 years ago

i solved it a few hours ago. For anyone who has this same problem, do these:

  1. Rename your "style.css" file to style.scss. It will give you some errors but don't worry about it.

  2. Install bootstrap by running the command; "npm i bootstrap" . This will install the latest bootstrap version which is bootstrap 4.

  3. You may also run into this error: "couldn't resolve typescript". Simply run the command: "npm i typescript". This will install typescript.

  4. Run ng serve --o or npm start. There will be no more errors and your angular fire page will be shown.

I had to figure it out myself.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.9.0
  • Device: pc
  • Browser: chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes