Questions tagged [npm-cache]

23 questions
31
votes
3 answers

Clear *just one* package from NPM cache

The problem: sometimes I run npm install x@latest but it doesn't actually pull the latest version of the package (that is lame). However, if I do: npm cache clean --force && npm install x@latest it will pull the latest but I actually would rather…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
6
votes
1 answer

How to check if NPM cache already contains a tarball

I am looking at the cache docs: https://docs.npmjs.com/cli/cache if I ran this: npm cache add lodash@x.y.z how can I check later, if this is in the npm cache? I don't see npm cache get lodash@x.y.z in the docs...
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
5
votes
1 answer

Caching NPM dependencies in Azure pipeline for in-built windows-latest image

I am trying to cache the npm dependencies in pipeline and below is the yaml code jobs: - job: Cypress_e2e_tests pool: vmImage: 'windows-latest' variables: npm_config_cache: C:\Users\VssAdministrator\AppData\Local\npm-cache steps: …
Kesiya Abraham
  • 753
  • 3
  • 10
  • 24
4
votes
0 answers

What does 'npm cache clean' clean?

npm cache clean [-f] should clean the cache dir (oh yes) But when I check my ~/.npm dir before and after the cleaning, the content is exactly the same. So my questions are: Which dir is cleaned when I run that cmd? What is the ~/.npm dir?
Daniel Juravski
  • 181
  • 1
  • 2
  • 12
3
votes
1 answer

In npm-cache directory, what are the folders other than _cacache for?

Navigating to npm cache directory, Users/UserName/%AppData%/Roaming/npm-cache in windows for example, I see so many folders. What are they for? When were they created and how can I remove them by npm cli? (I know the _cacache folder is for local…
moeinghasemi
  • 81
  • 1
  • 10
3
votes
2 answers

NPM ERR! CODE EINTEGRITY when i run create react app

I tried starting a new react project and i kept getting this error npm ERR! code EINTEGRITY npm ERR! errno EINTEGRITY npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/default-gateway: Integrity verification failed for…
2
votes
1 answer

Why is my NPM cache folder in ./false/_cacache?

I am on an NPM project using Docker, PhpStorm, VS Code and runs locally and through Docker. Under which circumstances is this folder put into ./false/? Has anyone encountered this in the past and would share what they found out? project-root-dir |__…
Daniel W.
  • 31,164
  • 13
  • 93
  • 151
1
vote
0 answers

how to avoid re-compiling an npm package?

in my pipelines, i regularly have to call npm ci some npm packages require compilation (e.g. pg-native, node-rdkafka) compilation is slow how can I make the second call to npm ci avoid compiling again? i have tried calling npm install -g…
1
vote
0 answers

Is there any possibility to limit size of npm-cache?

npm-cache folder is growing too big and I need to run clean cache manually. Is there any possibility to config npm so that cache doesn't exceed some limit? E.g. max=10GB?
psur
  • 4,400
  • 26
  • 36
1
vote
1 answer

How can I shim access to a private repository with scoped npm packages on a machine that can't access it?

Let's say I have a private, scoped NPM repository that lives behind a corporate firewall. I'd like to set my project up on another computer that will not connect to the VPN, so it will not be able to access that private repo. How can I set up my…
ruffin
  • 16,507
  • 9
  • 88
  • 138
1
vote
1 answer

Get cache location with env variable

I get get the NPM cache location using: cache_location="$(npm get cache)" however, is this value also represented by an env variable that I can read? Something like NPM_CACHE_LOCATION? https://docs.npmjs.com/cli/cache
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
1
vote
1 answer

`npm cache add ` does not work

I pack an NPM library with: tarball=$(npm pack) then I run npm cache add "$PWD/$tarball" but when I inspect the npm cache in .npm, there's nothing new there. Does anyone know why the NPM cache would not get updated by the add command?
user7898461
0
votes
0 answers

EACCES npm error in docker-compose cubejs container

I'm working on a docker-compose project. The goal is to get a database running, connected to a an angular app through cubejs. The idea is to use cube's dashboard maker for the angular app. I've been able to get both the database and cubejs running…
Ale T.
  • 1
  • 1
0
votes
0 answers

Azure DevOps, ENOENT issue with NPM Caching

I have this issue on build task the second time I run the build pipeline without any changement in my code: ENOENT: no such file or directory,…
Cedric Arnould
  • 1,991
  • 4
  • 29
  • 49
0
votes
2 answers

'ng' is not recognized after remove and reinstall

npm -g list command I can see installed Angular globally but when I run the ng --version it is giving this error ng: The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the…
1
2