yokawasa / action-setup-kube-tools

Github Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeconform, conftest, yq, rancher, tilt, skaffold) very fast and cache them on the runner. Please [✩Star] if you're using it!
MIT License
75 stars 22 forks source link

Fix error in GHA workflow: prettier: not found #25

Closed yokawasa closed 2 years ago

yokawasa commented 2 years ago

Signed-off-by: Yoichi Kawasaki yokawasa@gmail.com

Description

This is to resolve the error in GHA workflow

It can be reproduced like this:

$ npm run all

> action-setup-kube-tools@0.8.0 all
> npm run build && npm run format && npm run lint && npm run pack

> action-setup-kube-tools@0.8.0 build
> tsc

> action-setup-kube-tools@0.8.0 format
> prettier --write **/*.ts

sh: prettier: command not found <<<<<<<<<<<<<<< THIS

Resolve it with the following command

$ npm install --save prettier     # to resolve error: prettier command not found 
$ npm install --save eslint        # to resolve error : eslint command not found
$ npm install --save                  # to resolve error:  ncc: command not found 

Tested again and verified that it worked

$ npm run all

> action-setup-kube-tools@0.8.0 all
> npm run build && npm run format && npm run lint && npm run pack

> action-setup-kube-tools@0.8.0 build
> tsc

> action-setup-kube-tools@0.8.0 format
> prettier --write **/*.ts

src/main.ts 194ms

> action-setup-kube-tools@0.8.0 lint
> eslint src/*.ts

> action-setup-kube-tools@0.8.0 pack
> ncc build

ncc: Version 0.20.5
ncc: Compiling file index.js
172kB  dist/index.js
172kB  [993ms] - ncc 0.20.5