envs icon indicating copy to clipboard operation
envs copied to clipboard

Angular Compiler fails to import

Open znedw opened this issue 5 years ago • 5 comments

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/[email protected]
npm ERR! Found: [email protected]
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/[email protected]
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 ║
╚════════════════════╧═════════════════════════════════╧════════════════════════════════════════════════════════╧════════╝

znedw avatar Mar 31 '21 04:03 znedw

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

jesanhe avatar Apr 06 '21 08:04 jesanhe

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

alejandrombc avatar Apr 09 '21 20:04 alejandrombc

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/[email protected]
npm ERR! Found: [email protected]
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/[email protected]
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 ║
╚════════════════════╧═════════════════════════════════╧════════════════════════════════════════════════════════╧════════╝

jesanhe avatar Apr 13 '21 16:04 jesanhe

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

alejandrombc avatar Apr 13 '21 16:04 alejandrombc

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

jesanhe avatar Apr 14 '21 06:04 jesanhe