teambit / envs

Component development environments for the Bit community
https://bit.dev/bit/envs
Other
64 stars 9 forks source link

Angular Compiler fails to import #169

Open znedw opened 3 years ago

znedw commented 3 years ago

Describe the bug

Angular compiler fails to import using the tutorial @ https://docs.bit.dev/docs/tutorials/bit-angular-tutorial

Steps to Reproduce

  1. Clone angular sample repo from https://github.com/teambit/bit-angular-tutorial
  2. Follow the tutorial above steps to Install Angular Compiler
  3. Run bit import bit.envs/compilers/angular --compiler
  4. It fails

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots, exceptions and logs

❯ bit import bit.envs/compilers/angular -c -v
failed running npm install at C:\Users\zach\work\bit-angular-tutorial\.git\bit\components\compilers\angular\bit.envs\10.1.7 with args: --production
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @bit/bit.envs.compilers.angular@10.1.7
npm ERR! Found: typescript@4.0.3
npm ERR! node_modules/typescript
npm ERR!   typescript@"4.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">=3.0.0 <4.0" from @bazel/typescript@2.3.0
npm ERR! node_modules/@bazel/typescript
npm ERR!   @bazel/typescript@"2.3.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\zach\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\zach\AppData\Local\npm-cache\_logs\2021-03-31T04_14_44_165Z-debug.log

see troubleshooting at https://docs.bit.dev/docs/installing-components

run 'bit doctor' to get detailed workspace diagnosis and issue resolution.

Specifications

❯ bit doctor

  bit version   : 14.8.8
  node version  : v15.12.0
  npm version   : 7.7.6
  yarn version  : 1.22.5
  platform      : win32

╔════════════════════╤═════════════════════════════════╤════════════════════════════════════════════════════════╤════════╗
║ category           │ name                            │ description                                            │ status ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ configuration      │ validate workspace's bit config │ validate workspace configuration object                │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ vendors            │ validate git exec               │ validate that git executable found                     │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ internal store     │ check orphan refs               │ checks for empty internal refs in local workspace      │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ local environments │ check environment symlinks      │ validate generated symlinks for workspace environments │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ vendors            │ validate npm exec               │ validate that npm executable found                     │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ vendors            │ validate yarn exec              │ validate that yarn executable found                    │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ core               │ validate bit version            │ validate that bit version is up to date                │ passed ║
╚════════════════════╧═════════════════════════════════╧════════════════════════════════════════════════════════╧════════╝
jesanhe commented 3 years ago

I'm also experiencing this issue with the exact same output.

alejandrombc commented 3 years ago

Same here. It looks like its something about Node 15, maybe downgrading it to Node 14 may work

The problem is also with the apple M1 users, because the stable version for this chip is node 15

jesanhe commented 3 years ago

Same here. It looks like its something about Node 15, maybe downgrading it to Node 14 may work

The problem is also with the apple M1 users, because the stable version for this chip is node 15

I think it's nothing related with Node 15. I use node 14 and I'm having the same issue.

> bit import bit.envs/compilers/angular -c -v
failed running npm install at /home/esteel/projects/bit-angular-tutorial/.git/bit/components/compilers/angular/bit.envs/10.1.7 with args: --production
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @bit/bit.envs.compilers.angular@10.1.7
npm ERR! Found: typescript@4.0.3
npm ERR! node_modules/typescript
npm ERR!   typescript@"4.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">=3.0.0 <4.0" from @bazel/typescript@2.3.0
npm ERR! node_modules/@bazel/typescript
npm ERR!   @bazel/typescript@"2.3.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/esteel/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/esteel/.npm/_logs/2021-04-13T16_04_15_191Z-debug.log

see troubleshooting at https://docs.bit.dev/docs/installing-components

run 'bit doctor' to get detailed workspace diagnosis and issue resolution.
> bit doctor

  bit version   : 14.8.8
  node version  : v14.16.0
  npm version   : 7.7.6
  yarn version  : 1.22.10
  platform      : linux

╔════════════════════╤═════════════════════════════════╤════════════════════════════════════════════════════════╤════════╗
║ category           │ name                            │ description                                            │ status ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ configuration      │ validate workspace's bit config │ validate workspace configuration object                │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ vendors            │ validate git exec               │ validate that git executable found                     │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ internal store     │ check orphan refs               │ checks for empty internal refs in local workspace      │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ local environments │ check environment symlinks      │ validate generated symlinks for workspace environments │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ vendors            │ validate npm exec               │ validate that npm executable found                     │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ vendors            │ validate yarn exec              │ validate that yarn executable found                    │ passed ║
╟────────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────╢
║ core               │ validate bit version            │ validate that bit version is up to date                │ passed ║
╚════════════════════╧═════════════════════════════════╧════════════════════════════════════════════════════════╧════════╝
alejandrombc commented 3 years ago

What if you try to downgrade the npm version to 6.14.6?

jesanhe commented 3 years ago

What if you try to downgrade the npm version to 6.14.6?

I tried with npm version 6.14.12, and it's seems to work now. I'm gonna try to finish the tutorial to be sure it's all okay. Thanks @alejandrombc