-
Notifications
You must be signed in to change notification settings - Fork 48
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
latest nx-ignore failing in vercel with latest nx release #178
Comments
I downgraded nx-ignore to 15.5.0 and it's working with latest nx. I believe it's after this change |
I have the same problem since a few days.
For example, in a deployment two weeks ago, it also worked in version |
@mheob two weeks ago what was your nx version? It's not shown in the screenshot probably you didn't have verbose option back then. |
@saibs yes, the problem seems to be a mix of the current As a side note, my log from two weeks ago was running NX My main point in posting was to clarify that you are not alone in running this issue, but that more people are looking forward to a fix. |
This is still occurring for me running the latest versions of both Nx and nx-ignore - any indication of a solution or suggested workaround for this? |
I had a similar problem, I looked into the code and noticed they use npm to install a temporary version of nx. If I do this locally it will fail too. If I run the commands in the code with pnpm, it just works fine. A workaround is use this as a script: pnpm install && pnpm nx show projects --affected --base=$VERCEL_GIT_PREVIOUS_SHA --head=$VERCEL_GIT_COMMIT_SHA | (! grep -q "<your project>") This will assume though that you use |
|
@awilderink I tried your workaround and unfortunately it didn't work. I get the following error:
|
@tom-sherman checkouts on Vercel are shallow by default, and directly fetch your repo into a newly initialized local git repo, which means the local branch will always be
You can verify this by running a test and setting the ignore build script to just: |
I wasn't specifying main, I was doing |
Got it! I noticed it in this error, but looks like that was from a workaround:
Looks like this is something else then! |
I was able to get @awilderink's workaround working (with the help of @meshaabi 👏) by using corepack in the ignore step to ensure Vercel uses the correct version of pnpm. The ignore step was using pnpm v6 but we're on v8.
Of course you'll want to match your local pnpm version: I'd recommend placing this version in the
Also, we found that there was no need to install the entire workspace dependencies in the build step. |
Just wanted to check back in and say we removed this workaround and instead just not doing |
#329 fixes this issue for us. We can now do |
Awesome news 😄 Thanks for keeping the rest of us posted @tom-sherman |
I'm seeing this issue with NX v18.2.4 and nx-ignore v18.0.2 |
Since nx 15.7.0 nx-ignore command is failing in vercel with the following error.
I tried degrading to nx 15.6.0 and this command works fine.
The text was updated successfully, but these errors were encountered: