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

NestJs CLI prints strange message #1480

Closed
2 of 4 tasks
ulisses-cruz opened this issue Jan 9, 2022 · 25 comments
Closed
2 of 4 tasks

NestJs CLI prints strange message #1480

ulisses-cruz opened this issue Jan 9, 2022 · 25 comments

Comments

@ulisses-cruz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

image

Minimum reproduction code

npx @nestjs/cli -h

Steps to reproduce

npx @nestjs/cli -h

Expected behavior

should show the help message for the nestjs cli

Package version

last

NestJS version

No response

Node.js version

17.2.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

If it is not a problem of my computer, maybe nestjs cli repo was hacked

@DylanMorison
Copy link

I am having this problem as well on ubuntu

@pamelaschuldiner
Copy link

you can read all this here -> Marak/colors.js@074a0f8

@dpnilsen
Copy link

dpnilsen commented Jan 9, 2022

Same issue on Windows 10. Tried to uninstall and install older version (like 8.1.4, same issue though)

@NickKelly1
Copy link

Same issue on Ubuntu 21.10

Tried on NodeJS v14.17.4 and v17.3.0

@Tony133
Copy link
Contributor

Tony133 commented Jan 9, 2022

This is a problem with the color.js package

Marak/colors.js#285

@DylanMorison
Copy link

Is there a solution for this that anyone has found?

@pamelaschuldiner
Copy link

Is there a solution for this that anyone has found?

Well... you can always fix the version in your package-lock file to the last stable.
This is a protest. Nest shouldn't be depending on this package anymore I think... When is Nest (and others depending on this) going to change this? don't know xD

@ElvisKnapman
Copy link

ElvisKnapman commented Jan 9, 2022

same issue within the last hour or so

  • Windows 11
  • NestJS v8.0.0
  • Node.js v16.13.1

@liquidautumn
Copy link

liquidautumn commented Jan 9, 2022

@pamelaschuldiner Nest has colors dependency through cli-table3 which has pinned colors version already and going to phase it out completely in favor of chalk. This package will be fixed when #1478 merged and released.

@pamelaschuldiner
Copy link

@pamelaschuldiner Nest has colors dependency through cli-table3 which has pinned colors version already and going to phase it out completely in favor of chalk. This package will be fixed when #1478 merged and released.

Beautiful then! Thanks!

@micalevisk
Copy link
Member

Thus there's nothing we can do (neither on @nestjs/cli source) besides waiting for the next release of @nestjs/cli which depends on the next release of cli-table3.


dependency graph of @nestjs/cli

@liquidautumn
Copy link

@micalevisk it can be hotfixed unless real fixes go through the pipeline, ie aws/aws-cdk#18324 (comment)

@Duduzera1997
Copy link

Duduzera1997 commented Jan 9, 2022

+1

NestJS CLI: Latest
NodeJS: 14.18
S.O: MacOS Big Sur

Same problem in Docker build on Github Actions on the command nest build.

@jmcdo29
Copy link
Member

jmcdo29 commented Jan 9, 2022

We're aware of the problem, and the solution. Thanks everyone for letting us know. Thank you @liquidautumn for pointing out the PR from renovate as well. We'll have this merged and patched as soon as we can.

Please do not keep adding "+1" or "Same problem here" messages. They add a lot of noise to the day. Simply subscribe to the issue or use reactions to show support.

@jmcdo29
Copy link
Member

jmcdo29 commented Jan 10, 2022

Also, until we have this PR made, if you need a way around you can use the resolutions property of your package.json to pin colors to 1.4.0 if you use pnpm or yarn, or you can use npm-force-resolutions for resolve colors to the same version for npm

...
  "resolutions": {
    "colors": "1.4.0"
  }

Updated to version 1.4.0 after @kachkaev pointed out 1.4.1 is also affected

@kachkaev
Copy link

kachkaev commented Jan 10, 2022

"colors": "1.4.1" is also affected – see version history on npm and v1.4.1. on unpkg. The latest safe version to date is 1.4.0 (released on 2019-09-22).

@kyawswarthwin
Copy link

Win 11
Node v16.13.1
npm 8.3.0

any temporary solution to work "nest new project-name"?

@jmcdo29
Copy link
Member

jmcdo29 commented Jan 10, 2022

git clone the typescript-starter repository and resolve the issue in the local repo. Not much else to be done right now

@quyennt21
Copy link

quyennt21 commented Jan 10, 2022

@kyawswarthwin go to your_global_npm_path/node_module find @nestjs/cli > add

"overrides": {
"colors": "1.4.0"
} to package.json
And run re-install package nestjs/cli

@kyawswarthwin
Copy link

@quyennt21 thanks it works.

@kyawswarthwin
Copy link

@quyennt21 I can't start my nest project with npm run start. It shows the same error.

@quyennt21
Copy link

quyennt21 commented Jan 10, 2022

@quyennt21 I can't start my nest project with npm run start. It shows the same error.

Change package json in Your_project/node_modules/ nestjs cli.

@Mark24Code
Copy link

Mark24Code commented Jan 10, 2022

same issues

nest --help nest -v you will get a mess of chars on screen , sometimes it makes terminal crash.

截屏2022-01-10 下午2 58 14

@onldosalm
Copy link

it is a temporary fix!

add to your package.json

"overrides": {
  "cli-table3": "0.6.1"
}

remove unnecessaries

  • remove node_modules
  • remove package-lock.json

re-install npm modules

npm install

@kamilmysliwiec
Copy link
Member

This should be fixed in 8.1.8! Thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests