teambit / bit-angular

Angular support for bit harmony
28 stars 3 forks source link

Error on bit tag command #43

Closed blairjanis closed 2 years ago

blairjanis commented 2 years ago

I'm trying to figure out how to get my angular component to export to my scope on bit.dev. From what I understand I need to run the tag command:

bit tag my-button --message "first publish"

It runs for a while and then I get this error:

Failed task 1: "teambit.preview/preview:GeneratePreview" of env "teambit.angular/angular@1.1.1"
component: docuprep.components/my-button@0.0.1
ModuleNotFoundError: Module not found: Error: Can't resolve '@teambit/component-version' in '/home/ec2-user/Library/Caches/Bit/capsules/26462d4ac2b9c78db94588a991a4c13d510b7ebd/node_modules/@teambit/legacy/dist/utils'
ModuleNotFoundError: Module not found: Error: Can't resolve '@teambit/component-version' in '/home/ec2-user/Library/Caches/Bit/capsules/26462d4ac2b9c78db94588a991a4c13d510b7ebd/node_modules/@teambit/legacy/dist/utils'
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/Compilation.js:2013:28
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:795:13
    at eval (eval at create (/home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:275:22
    at eval (eval at create (/home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:431:22
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:124:11
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:667:25
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:852:8
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:972:5
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/neo-async/async.js:6883:13
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/webpack/lib/NormalModuleFactory.js:955:45
    at finishWithoutResolve (/home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/enhanced-resolve/lib/Resolver.js:312:11)
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/enhanced-resolve/lib/Resolver.js:386:15
    at /home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/@angular-devkit/build-angular/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/home/ec2-user/Library/Caches/Bit/capsules/c7125fcaf941dd4df92f4649e68d0fe64e804ed4/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)

Found 1 errors in 1 components

✖ Total 7 tasks. 6 succeeded. 1 failed. 0 skipped. Total errors: 1.

I'm new to bit and am not very familiar with the workflow so I'm not sure what information will help track down what could be producing this error. Any guidance or help is appreciated.

blairjanis commented 2 years ago

I got it to work by running ...

yarn add @teambit/component-version

I'm not sure why this isn't included in the dependencies for teambit.angular/angular.

ocombe commented 2 years ago

Hello, thanks for the report. It looks like it's a dependency of a dependency that went missing after a change, I'll investigate to figure out where that's missing and publish a fix.

GiladShoham commented 2 years ago

should be resolved by - https://github.com/teambit/bit/pull/5968

GiladShoham commented 2 years ago

please check with bit 0.0.763 (or higher) and re-open if it still happen