actions icon indicating copy to clipboard operation
actions copied to clipboard

Fail to install netlify cli action

Open Wyfy0107 opened this issue 4 years ago • 16 comments

We're using this action in ubuntu-latest environment, with node 12.x The installation failed with some weird logs below

Screenshot 2022-01-10 at 12 27 39

Wyfy0107 avatar Jan 10 '22 10:01 Wyfy0107

got the same error

it's caused by this https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6

bogdibota avatar Jan 10 '22 10:01 bogdibota

npm seems to have removed the problematic version of colors.js, so I think it's working now!

sawa-zen avatar Jan 11 '22 06:01 sawa-zen

👋 I think it does not completely solve the issue. The build is ok BUT the deploy now fails silently with RangeError: Invalid array length.

Do you confirm the same issue?

update ok sorry, this fix is not yet on master.

AdrienFromToulouse avatar Jan 11 '22 09:01 AdrienFromToulouse

Oops. I was experiencing the same problem 😵‍💫 I'm sorry I didn't notice. log

sawa-zen avatar Jan 11 '22 10:01 sawa-zen

Although it seems that moving to npm will introduce another issue of access right during the build:

https://github.com/netlify/cli/issues/1870

do you reproduce on your CI too?

AdrienFromToulouse avatar Jan 11 '22 10:01 AdrienFromToulouse

For instance I tried that branch which implements the fix uses: mannum/netlify-actions/cli@master and face the issue

https://github.com/mannum/netlify-actions/blob/master/cli/Dockerfile#L12

I am running on runs-on: ubuntu-latest

AdrienFromToulouse avatar Jan 11 '22 10:01 AdrienFromToulouse

Oops. I was experiencing the same problem 😵‍💫 I'm sorry I didn't notice. log

I think you are still using yarn, but the package has been somehow "removed" to not create anymore issues. This seems to be a side effect.

AdrienFromToulouse avatar Jan 11 '22 10:01 AdrienFromToulouse

OK. I'll try mannum/netlify-actions too.

sawa-zen avatar Jan 11 '22 10:01 sawa-zen

It would be nice if the Netlify team could maintain this and put that into their OKRs, especially for paid customer. #rant

AdrienFromToulouse avatar Jan 11 '22 10:01 AdrienFromToulouse

I found it, that requires to upgrade the node version of the image to the most recent if we want to use npm: https://github.com/netlify/cli/issues/1870#issuecomment-799845077

Their version is still node 12 on master.

AdrienFromToulouse avatar Jan 11 '22 10:01 AdrienFromToulouse

@AdrienFromToulouse Just to be sure, the current fix would be to use mannum/netlify-actions with node latest ?

Wyfy0107 avatar Jan 11 '22 10:01 Wyfy0107

I don't know why with Yarn it keeps failing but using npm you need a recent version of node/npm. Works on my end with

FROM node:16-alpine

LABEL version="1.0.1"
LABEL repository="http://github.com/netlify/actions"
LABEL homepage="http://github.com/netlify/actions/netlify"
LABEL maintainer="Netlify"
LABEL "com.github.actions.name"="Netlify"
LABEL "com.github.actions.description"="Wraps the Netlify CLI to enable common Netlify commands"
LABEL "com.github.actions.icon"="cloud"
LABEL "com.github.actions.color"="blue"

RUN npm install -g netlify-cli

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

@Wyfy0107 you may just fork netlify action and modify the dockerfile and point to your own fork.

AdrienFromToulouse avatar Jan 11 '22 11:01 AdrienFromToulouse

Huh? I can now deploy with netlify/actions/cli@master. log

sawa-zen avatar Jan 11 '22 11:01 sawa-zen

May be some cache on yarn? idk

AdrienFromToulouse avatar Jan 11 '22 11:01 AdrienFromToulouse

I don't know either ¯_(ツ)_/¯

@AdrienFromToulouse If you try netlify/actions/cli@master now, will it succeed?

sawa-zen avatar Jan 11 '22 12:01 sawa-zen

I tried again yesterday and it works now 😅

Wyfy0107 avatar Jan 12 '22 09:01 Wyfy0107