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

Workflow is failing without json arg #3

Closed
florianlauer opened this issue Jul 18, 2023 · 8 comments
Closed

Workflow is failing without json arg #3

florianlauer opened this issue Jul 18, 2023 · 8 comments

Comments

@florianlauer
Copy link

Hi,
Just to let you know that your action is falling if you don't pass the --json option in the args. I've added you a screenshot to illustrate.
image
Cheers
Florian

@South-Paw
Copy link
Owner

Thanks for letting me know, probably just that fromJson doesn't work on the empty string when the --json flag is omitted.

Might just be as simple as adding an or operator || to the action.yml file

The README does mention that "note that the --json flag has been passed when deploying" and the work around is just to add the --json flag so I don't really consider this too urgent unless its actively breaking something?

@florianlauer
Copy link
Author

It's not just the outputs that break, it's the whole step as far as I've tried, I wasn't using the outputs while trying first.
So maybe adding the info that the --json flag is required to make everything work should be more visible than a comment in the code example, or if you have any time to make it not fail without it could be even better!

@leeovery
Copy link

Im seeing this same issue and I am passing the json flag as an arg. Very strange.

@leeovery
Copy link

Actually my errors are a little different:

CleanShot 2023-07-26 at 14 57 50@2x

@leeovery
Copy link

Sorry to triple post. Seems my issues were related to something else on the Netlify end. Not sure what tbh but its working now haha. Its possible that deploying manually got it working again as I hadnt deployed for 2 months due to working on other stuff.

@South-Paw
Copy link
Owner

@leeovery Yeah it looks like the action throws out this kind of error when it can't parse outputs for any reason. I just got it for trying to deploy a non-existent dir.

@leeovery
Copy link

Yea I figured out the same thing a few days ago. My error was typescript wasn't compiling during the build process. The action was suppressing the error so it was hard to track down. 😂

@South-Paw
Copy link
Owner

South-Paw commented Sep 13, 2023

Yeah I think I'm debugging a similar issue elsewhere as well.

I determined the simplest fix was to remove these outputs - they can still be accessed however, you just need to parse them from the output yourself using fromJson. Have added a recipe to the README for this as well to help others.

Closed by #4

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

3 participants