Skip to content

CLI seems to depend on recent chalk, but it is not a devDependency #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mikehardy opened this issue Jul 10, 2019 · 1 comment · Fixed by #517
Closed

CLI seems to depend on recent chalk, but it is not a devDependency #516

mikehardy opened this issue Jul 10, 2019 · 1 comment · Fixed by #517
Labels
bug Something isn't working

Comments

@mikehardy
Copy link
Contributor

Environment

info Fetching system and libraries information...
System:
    OS: Linux 5.1 Ubuntu 19.04 (Disco Dingo)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 5.41 GB / 31.13 GB
    Shell: 5.0.3 - /bin/bash
  Binaries:
    Node: 12.5.0 - ~/.nvm/versions/node/v12.5.0/bin/node
    Yarn: 1.16.0 - ~/.nvm/versions/node/v12.5.0/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v12.5.0/bin/npm
  SDKs:
    Android SDK:
      API Levels: 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 24.0.0, 24.0.2, 25.0.0, 25.0.1, 25.0.2, 26.0.0, 26.0.3, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0
      System Images: android-15 | Intel x86 Atom, android-15 | Google APIs Intel x86 Atom, android-16 | ARM EABI v7a, android-16 | Intel x86 Atom, android-16 | Google APIs Intel x86 Atom, android-17 | Intel x86 Atom, android-17 | Google APIs Intel x86 Atom, android-18 | Intel x86 Atom, android-18 | Google APIs Intel x86 Atom, android-19 | Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-21 | Intel x86 Atom, android-21 | Google APIs Intel x86 Atom, android-22 | ARM EABI v7a, android-22 | Intel x86 Atom, android-22 | Google APIs ARM EABI v7a, android-23 | Android TV Intel x86 Atom, android-23 | Intel x86 Atom, android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-24 | ARM 64 v8a, android-24 | ARM EABI v7a, android-24 | Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-25 | Google APIs ARM 64 v8a, android-25 | Google APIs ARM EABI v7a, android-25 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-Q | Google Play Intel x86 Atom_64, chromeos-67 | Chrome OS 67
      Android NDK: 20.0.5594570
  npmPackages:
    @react-native-community/cli: ^2.4.0 => 2.4.0 
    react: ^16.8.6 => 16.8.6 
    react-native: ^0.60.0 => 0.60.0 
  npmGlobalPackages:
    react-native-cli: 2.0.1

...react-native info hangs at that point on my system, which I suppose is a different issue

Description

Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
error _chalk(...).default.dim is not a function
TypeError: _chalk(...).default.dim is not a function
    at /home/mike/work/foo/bar/node_modules/@react-native-community/cli-platform-android/build/link/warnAboutManuallyLinkedLibs.js:56:219

This line depends on a "modern" chalk library:

https://github.com/react-native-community/cli/blob/master/packages/platform-android/src/link/warnAboutManuallyLinkedLibs.js#L42

But my setup for whatever reason had an old one (0.4.0). After I did npm i --save-dev chalk to get a modern one, I was able to proceed past the error

Should CLI declare a devDependency on chalk?

Reproducible Demo

@thymikee
Copy link
Member

Thanks! cli-platform-android needs to have a dependency on chalk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants