Closed paurakhsharma closed 2 years ago
Hi @paurakhsharma !
Thanks for the issue.
From what I can see in the logs there is:
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
however this action is supposed to use node-current, so 18 at the moment. The bug should not be happening in your case.
Does your workflow run after a build workflow? If so, are you using a specific node version? If that's the case maybe updating node/npm in that workflow could solve the issue. Let us know!
No this is the only build workflow I have.
I am serving static files via Netlify but I have some cloud functions.
I need to run npm build
only to install the dependencies for the cloud functions.
Hi @paurakhsharma
Could you try using actions/setup-node to setup a newer version of node before running npm build
? If your project supports node latest we can try (18.3 i believe), otherwise we can go for lts (16.15.1 i believe)
Thank you so much. Looks like it is fixed for now. But it happens infrequently so I cannot be sure for now. I will re-open the issue if it happens again and I get the hint that it is related to this GitHub action.
Great! Keep up up to date!
This happens once in a while. I haven't been able to reproduce it consistently.
This is now my workflow file looks like.
And my
npm run build
script doesnpm install
This is the log I get in github actions.
``` npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated statsd-client@0.4.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash. npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future added 1404 packages, and audited 1405 packages in 1m 157 packages are looking for funding run `npm fund` for details 10 vulnerabilities (1 moderate, 9 high) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. up to date, audited 1 package in 319ms found 0 vulnerabilities > nepali_christian_songs@1.0.0 build > cd functions && npm install npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /github/home/.npm/_cacache/content-v2/sha1/1b/0a npm ERR! errno -13 npm ERR! npm ERR! Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed. npm ERR! npm ERR! To permanently fix this problem, please run: npm ERR! sudo chown -R 1001:[12](https://github.com/paurakhsharma/nepali_christian_songs/runs/6878223643?check_suite_focus=true#step:4:13)1 "/github/home/.npm" npm ERR! A complete log of this run can be found in: npm ERR! /github/home/.npm/_logs/2022-06-14T10_[13](https://github.com/paurakhsharma/nepali_christian_songs/runs/6878223643?check_suite_focus=true#step:4:14)_07_4[25](https://github.com/paurakhsharma/nepali_christian_songs/runs/6878223643?check_suite_focus=true#step:4:26)Z-debug-0.log ```