-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Cache can't be used in workspaces #712
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
Comments
Hello @ferferga ! |
I hope this fixes the issues. The error message suggests that the npm
config get cache command is not supported when running with workspaces. To
fix this error, you can set the --ignore-workspaces flag when running the
npm command. Here's an updated version of the code
Run ***@***.***
Attempt to resolve the latest version from manifest...
Resolved as '18.15.0'
Attempting to download 18.15.0...
Acquiring 18.15.0 - x64 from
https://github.com/actions/node-versions/releases/download/18.15.0-4362038354/node-18.15.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword -C
/home/runner/work/_temp/1c9849b8-5616-425f-b0bf-ab2eb5377e6d -f
/home/runner/work/_temp/526a4e8e-a4af-491c-ab91-c333c883911b
Adding to the cache ...
Done
Environment details
/opt/hostedtoolcache/node/18.15.0/x64/bin/npm --ignore-workspaces config
get cache
By using the --ignore-workspaces flag, the npm config get cache command
should now run successfully without the ENOWORKSPACES error.
…On Tue, Mar 14, 2023 at 8:21 AM MaksimZhukov ***@***.***> wrote:
Hello @ferferga <https://github.com/ferferga> !
Thank you for reporting this! We will investigate the issue
—
Reply to this email directly, view it on GitHub
<#712 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLQYUOQFUBQMOVL7ERRY6DW4BPDLANCNFSM6AAAAAAV2HNBBQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@yandyestrada That's an interesting workaround, thank you! @MaksimZhukov I think it might be a good idea to invoke the command with the flag, even after npm gets the issue fixed (as far as I understand from the issue at their repo, it's a regression and not an intended bheaviour). I guess it shouldn't harm? Some configs might be workspace-related, but I'm not aware that's the case with the cache path. |
you're welcome anytime...
…On Tue, Mar 14, 2023 at 8:36 AM Fernando Fernández ***@***.***> wrote:
@yandyestrada <https://github.com/yandyestrada> That's an interesting
workaround, thank you!
@MaksimZhukov <https://github.com/MaksimZhukov> I think it might be a
good idea to invoke the command with the flag, even after npm gets the
issue fixed (as far as I understand from the issue at their repo, it's a
regression and not an intended bheaviour). I guess it shouldn't harm? Some
configs might be workspace-related, but I'm not aware that's the case with
the cache path.
—
Reply to this email directly, view it on GitHub
<#712 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLQYUOJD26RPEZSDFT4VJLW4BQ5VANCNFSM6AAAAAAV2HNBBQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@yandyestrada I tried locally with the |
Ok did you guys found a away around and fixed it?
On Wed, Mar 15, 2023 at 1:19 PM Fernando Fernández ***@***.***> wrote:
@yandyestrada <https://github.com/yandyestrada> I tried locally with the
--ignore-workspaces argument and it doesn't work, so we can't even
workaround this that way.
—
Reply to this email directly, view it on GitHub
<#712 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLQYUJUPVABS2ITUNEE7ADW4H2ZHANCNFSM6AAAAAAV2HNBBQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Yandy Estrada
CENTURY 21 Rosa Leon
REALTOR® / Office Manager
7025 W Hillsborough Ave
Tampa FL 33634
***@***.***
(813) 679-4958
|
Co-authored-by: Fernando Fernández <ferferga@hotmail.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit.
Co-authored-by: Fernando Fernández <ferferga@hotmail.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the Gitrhub Actions workflows using the official VSCode GitHub extension
Co-authored-by: ferferga <ferferga@hotmail.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the Gitrhub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the Gitrhub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the Gitrhub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the Gitrhub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the GitHub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the GitHub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the GitHub Actions workflows using the official VSCode GitHub extension
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com> Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol), the `npm get config` command stopped working in workspaces. This made our actions using actions/setup-node to fail. Issues were opened in the relevant repositories since january and february (check npm/cli#6099 and actions/setup-node#712) but it looks like getting this fixed upstream it's going to take a long time. We have been waiting for a really long time for other fixes in npm, so I don't expect this situation will be solved really soon We need a working CI before the Vue 3 merge, so applying this commit will solve the issue in the meantime. In the future, it might be interesting to revert this commit. Also format the GitHub Actions workflows using the official VSCode GitHub extension
replace caching action due to actions/setup-node#712
replace caching action due to actions/setup-node#712
disable caching due to actions/setup-node#712
disable caching due to actions/setup-node#712
disable caching due to actions/setup-node#712
Hello @ferferga, I tried to reproduce the problem but the workflow does not fail: 1st run (create cache for The mentioned issue npm/cli#6099 does not seem to relate to this issue because it appears if Can you please help us with the reproducing the problem? |
@dsame you need to set |
bypass actions/setup-node#712 by turning of workspaces for the duration of the setup-node action
I'm working around this by running setup-node with
|
bypass actions/setup-node#712 by turning of workspaces for the duration of the setup-node action
bypass actions/setup-node#712 by turning of workspaces for the duration of the setup-node action
this is problematic when a workspace calls npm run as well as issues like actions/setup-node#712
this is problematic when a workspace calls npm run as well as issues like actions/setup-node#712
this is problematic when a workspace calls npm run as well as issues like actions/setup-node#712
this is problematic when a workspace calls npm run as well as issues like actions/setup-node#712
this is problematic when a workspace calls npm run as well as issues like actions/setup-node#712
Hi @ferferga 👋,
|
Hi @ferferga 👋, |
@priyagupta108 I'd say the issue it's not relevant (at least not here, because I do still believe that config commands should work regardless of the workspace setup, but that's for npm/cli and it's being tracked at npm/cli#6099) I will close this issue, but I also think that the workarounds suggested in this thread are good enough for most cases, so this issue would be useful as well to be linked for future user's reference, so you might consider labelling it accordingly or pinning it. Thank you very much. |
Description:
When using a repo with workspaces and the latest node versions (which also bundle more up-to-date npm versions), actions fail because it can't retrieve the cache path.
Updating the action version doesn't change anything. I'm sure this is the same thing as npm/cli#6099 but I'm opening this as I think it fits here too, so people affected by this can find this ticket. Maybe there's also some workaround or you can push a bit the npm team to get this fixed quickier :)
Sample failing job
Action version:
v3.5.1
Platform:
Runner type:
Tools version:
node:
v18.15.0
yarn:
1.22.19
npm:
9.5.0
Repro steps:
Expected behavior:
Cache works as expected and the action succeeds
Actual behavior:
The action halts completely
The text was updated successfully, but these errors were encountered: