-
I’m following the tutorial here: Introduction to GitHub Actions - GitHub Docs I’ve followed the instructions exactly, including copy-pasting the example code, but when I push and Github Actions runs it produces the following error:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
You are correct, the instructions are flawed. Reported at:
Following Github Actions tutorial but getting an npm EACCES error
<!-- HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPE…N AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD. --> <!-- Before you file an issue read the:
Check to make sure someone hasn't already opened a similar issue: https://github.com/github/docs/issues What article on docs.github.com is affected?What part(s) of the article would you like to see updated?Additional informationhttps://github.com/jsoref/188088/runs/2965080849?check_suite_focus=true I followed the instructions:
It fails: Precisely as reported here: Yes. I know how to do this right, but I should be able to follow the instructions (as @seddonr faithfully attempted) and get a working product. To learn one of many ways to fix this, you could read:
How to fix permissions on globally installing npm packages on linux - danillo...Is common have packages that works globally, they make the work more easy in some ways, provide functionalities, et al.. The difference in npm packages that are installed globally and locally is that you will setup a package like a program avaliable... I’m sorry you hit a document that gave incorrect instructions. |
Beta Was this translation helpful? Give feedback.
-
Thank you for reporting the problem. I attempted to implement the suggested fix,
However now I get a different error:
|
Beta Was this translation helpful? Give feedback.
-
ProblemEach The one where it mattered the most was RecommendationI think you want this (untested):
For reference, I picked the Note: technically yo don’t need to use
AlternativeFWIW, there is an alternative, https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable However, in reading that pair of pages in context w/ a goal here, I expect that the average reader will be mislead. So, I guess I get to file another bug. |
Beta Was this translation helpful? Give feedback.
-
Thanks Jsoref: Confirming this solution worked for me:
Output from GitHub Job:
Best~ lar-mo |
Beta Was this translation helpful? Give feedback.
Problem
Each
run
statement almost certainly gets its own environment.The one where it mattered the most was
source ~/.profile
, where you really needed it to last to the next step (npm install ...
).Recommendation
I think you want this (untested):
For reference, I picked the
|
…