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

post setup-node throws an error - missing pnpm store dir #543

Closed
2 of 5 tasks
dominikg opened this issue Jul 12, 2022 · 9 comments
Closed
2 of 5 tasks

post setup-node throws an error - missing pnpm store dir #543

dominikg opened this issue Jul 12, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@dominikg
Copy link

Description:
post setup-node throws an error about a missing store directory for pnpm

Action version:
3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

node16, pnpm 7.5.1

Repro steps:
workflow:
https://github.com/sveltejs/vite-plugin-svelte/blob/main/.github/workflows/ci.yml
run with error:
https://github.com/sveltejs/vite-plugin-svelte/runs/7306898304?check_suite_focus=true

Expected behavior:

pnpm store is detected correctly and cached in post-action - no error thrown.
Even if the run completed correctly but for whatever reason the pnpm store could not be cached, post should not throw an error, causing a CI fail.

Actual behavior:

An error is thrown in post setup-node, failing the run

@dominikg dominikg added bug Something isn't working needs triage labels Jul 12, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @dominikg. Thank you for your report. I think it can't save the cache because pnpm store path returns such output:

Using hooks from: /home/runner/work/vite-plugin-svelte/vite-plugin-svelte/.pnpmfile.cjs
readPackage hook is declared. Manifests of dependencies might get overridden
/home/runner/.local/share/pnpm/store/v3

It gets extra logging that is why the action can't get correct path. As temporary solution could you please create .npmrc file with such content:

loglevel=warn # or error

@dominikg
Copy link
Author

dominikg commented Jul 12, 2022

hmm, that's very unfortunate and could break a lot of CIs, In fact i wonder why it hasn't caused more trouble until now.

Can confirm that the additional logging appears when updating from pnpm 7.5.0 to 7.5.1

cc @zkochan

the impact is limited by the fact that not everyone uses .pnpmfile.cjs

@RIP21
Copy link

RIP21 commented Jul 12, 2022

Have a similar issue and can confirm above too.

Post job cleanup.
/home/runner/setup-pnpm/node_modules/.bin/pnpm store path
Using hooks from: /home/runner/work/utopia-core/utopia-core/.pnpmfile.cjs
readPackage hook is declared. Manifests of dependencies might get overridden
Error: Cache folder path is retrieved for pnpm but doesn't exist on disk: Using hooks from: /home/runner/work/utopia-core/utopia-core/.pnpmfile.cjs
readPackage hook is declared. Manifests of dependencies might get overridden
/home/runner/.local/share/pnpm/store/v3

@dmitry-shibanov
Copy link
Contributor

Hello @RIP21. Could you please as temporary solution add .npmrc file with loglevel=warn ?

@dominikg
Copy link
Author

can confirm that loglevel=warn in .npmrc avoids the problem

https://github.com/sveltejs/vite-plugin-svelte/runs/7309633235?check_suite_focus=true#step:16:6

@zkochan
Copy link

zkochan commented Jul 12, 2022

pnpm store path should only print the path to the store, so it is a bug.

@dmitry-shibanov
Copy link
Contributor

Hello everyone. I've merged fix in the main branch. Could you please confirm that it works as expected for actions/setup-node@main ?

@dmitry-shibanov
Copy link
Contributor

Hello everyone. We released a new version and updated the major tag with fix. Could you please confirm that everything works as expected ?

@dominikg
Copy link
Author

TkDodo added a commit to TkDodo/react-query that referenced this issue Sep 29, 2022
TkDodo added a commit to TanStack/query that referenced this issue Sep 30, 2022
* feat(queryObserver): add isInitialLoading derived flag

this flag describes isLoading && isFetching and can be used to show a loading spinner for lazy or disabled queries

* chore(ci): fix caching

apparently, v3 has a fix: actions/setup-node#543

* chore(ci): properly fix token issue

as described here: https://stackoverflow.com/questions/52015748/npm-failed-to-replace-env-in-config-npm-token

he extra warn output made the caching fail

* chore: fix bundlewatch glob

* docs: add a section about isInitialLoading to the migration guide
Olaf0703 added a commit to Olaf0703/query that referenced this issue Feb 28, 2023
* feat(queryObserver): add isInitialLoading derived flag

this flag describes isLoading && isFetching and can be used to show a loading spinner for lazy or disabled queries

* chore(ci): fix caching

apparently, v3 has a fix: actions/setup-node#543

* chore(ci): properly fix token issue

as described here: https://stackoverflow.com/questions/52015748/npm-failed-to-replace-env-in-config-npm-token

he extra warn output made the caching fail

* chore: fix bundlewatch glob

* docs: add a section about isInitialLoading to the migration guide
Cute0110 added a commit to Cute0110/TanStack-Query that referenced this issue Sep 28, 2023
* feat(queryObserver): add isInitialLoading derived flag

this flag describes isLoading && isFetching and can be used to show a loading spinner for lazy or disabled queries

* chore(ci): fix caching

apparently, v3 has a fix: actions/setup-node#543

* chore(ci): properly fix token issue

as described here: https://stackoverflow.com/questions/52015748/npm-failed-to-replace-env-in-config-npm-token

he extra warn output made the caching fail

* chore: fix bundlewatch glob

* docs: add a section about isInitialLoading to the migration guide
SerhiiMisiura added a commit to SerhiiMisiura/TanStack-Query that referenced this issue Oct 6, 2023
* feat(queryObserver): add isInitialLoading derived flag

this flag describes isLoading && isFetching and can be used to show a loading spinner for lazy or disabled queries

* chore(ci): fix caching

apparently, v3 has a fix: actions/setup-node#543

* chore(ci): properly fix token issue

as described here: https://stackoverflow.com/questions/52015748/npm-failed-to-replace-env-in-config-npm-token

he extra warn output made the caching fail

* chore: fix bundlewatch glob

* docs: add a section about isInitialLoading to the migration guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants