c-hive / gha-npm-cache Goto Github PK
View Code? Open in Web Editor NEW1-liner npm install cache for GitHub Actions
License: MIT License
1-liner npm install cache for GitHub Actions
License: MIT License
See: #9 (comment)
For now, the directory
option works as well.
Monorepo support would be super awesome.
Including the npm caching logic in every GitHub Action I write is so annoying. Having this as a one-liner makes my logic so much cleaner :) Thanks for making this library!
This GH Action will cache the OS-specific NPM directory, as per official recommendation. However this will not include compiled targets that modules ensure on postinstall
, which (in my case) are found in node_modules
.
I'm guessing this kind of support is out of scope for gha-npm-cache, but I want to create a paper trail for others.
when I use this library, I see the GitHub Action failed with this error. please help me on this.
/usr/bin/uname
Linux
/opt/hostedtoolcache/node/14.17.1/x64/bin/npm config get cache
/home/runner/.npm
Error: Error: ENOENT: no such file or directory, open 'package-lock.json'
Could it be possible to add the support for multiple jobs ?
I tried to use it the same way as it is used in steps, but it doesn't seems to be working correctly. (Getting errors module not found)
Could it be possible to have this feature ? It could be really useful instead of creating artifact and passing it around.
I'm fairly new to github actions, i can understand this is not something supported by actions (nor wanted maybe)
I'm using windows-latest in the workflow, and I'm trying to cache the dependencies so that the process runs faster. and I only get this message:
Run c-hive/gha-npm-cache@v1
"C:\Program Files\Git\usr\bin\uname.exe"
MSYS_NT-10.0-20348
C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\node\16.15.1\x64\npm.cmd config get cache"
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
C:\npm\cache
Cache keys: MSYS_NT-10.0-20348-npm-cache-1458c27d3e2bedec3251db8741195aca, MSYS_NT-10.0-20348-npm-cache-
Cache not found.
but at the end it gives me the message that the cache was saved:
Post job cleanup.
C:\Windows\System32\tar.exe -z -cf cache.tgz -P -C D:/a/novac-system/novac-system --files-from manifest.txt
Cache saved successfully.
I need help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.