teambit / bit-angular

Angular support for bit harmony
28 stars 3 forks source link

Module not found: Error: Can't resolve 'html-loader' #39

Closed abhi9bakshi closed 2 years ago

abhi9bakshi commented 2 years ago

I followed the steps in https://github.com/teambit/bit-angular as is and got the error on running bit start after creating ui/my-button. Running bit start directly after bit new ng-workspace doesn't throw error.

Module not found: Error: Can't resolve 'html-loader' in '/home/abhi9/Library/Caches/Bit/capsules/4449ca0ffbd1bf94b513919b0aa94c2a37e76f6e/teambit.angular_angular@0.0.55/preview'

Error

HTML Loader

Missing library

OS: Zorin 16 (Ubuntu 20 based) Node: 16.14.0

AntGrisha commented 2 years ago

same issue with node v12.22 and angular v10

AntGrisha commented 2 years ago

@abhi9bakshi I've fixed it by doing the following steps:

  1. Clear cache created by bit, I mean this folder in your case /home/abhi9/Library/Caches/Bit/capsules/4449ca0ffbd1bf94b513919b0aa94c2a37e76f6e
  2. update your peer deps in workplace.jsonrc: "peerDependencies": { ... , "html-loader": "1.3.2", "remark-loader": "2.0.0" }
  3. run bit install
  4. run bit start

Issue has been resolved in my case

abhi9bakshi commented 2 years ago

Works like a charm, thanks :)