Skip to content
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

TypeError: Cannot read property 'dim' of undefined #86

Closed
shazron opened this issue Nov 21, 2019 · 3 comments
Closed

TypeError: Cannot read property 'dim' of undefined #86

shazron opened this issue Nov 21, 2019 · 3 comments

Comments

@shazron
Copy link
Contributor

shazron commented Nov 21, 2019

Log

$ ./bin/run plugins
TypeError: Cannot read property 'dim' of undefined
    at Object.<anonymous> (~/Desktop/package-2.2.1/node_modules/@oclif/color/lib/index.js:10:86)
    at Object.<anonymous> (~/Desktop/package-2.2.1/node_modules/@oclif/plugin-plugins/lib/commands/plugins/index.js:3:17)

Expected

The plugins command successfully lists all the plugins.

Actual

An exception is logged.

Cause

The @oclif/color module does not have chalk as a dependency in it's dependencies list in package.json in the npm released version 0.0.0 (there is no tag in the repo as well). This causes the null exception in the code above.

The code in master branch however, already has the required dependency.

Fix

Release a new version of @oclif/color from the master branch code.

@RasPhilCo
Copy link
Contributor

Clossed by oclif/color@6df5f9d

@shazron
Copy link
Contributor Author

shazron commented Mar 31, 2020

Can you re-open this? We are still seeing this issue.

Since this package specifies @oclif/color at ^0.0.0 it will not pick up @oclif/[email protected]
See: https://jubianchi.github.io/semver-check/#/^0.0.0/0.1.0 - at a glance I thought it would pick it up but apparently not.

This package will need to update the dependency semver for @oclif/color to ^0.x.

@shazron
Copy link
Contributor Author

shazron commented Apr 2, 2020

See PR #92

RasPhilCo pushed a commit that referenced this issue Apr 15, 2020
see #86 
`^0.0.0` will only match `0.0.0`, and will not pick up the latest @oclif/color which is at `0.1.0`, that fixes an exception.
`0.x` will properly match all pre-release versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants