piątek, 30 sierpnia 2024

npm error LRUCache is not a constructor

When I updated my npm and node versions on my PC for over few years and try to insall/unistall anything on my PC I get error: "npm error LRUCache is not a constructor"

Then I have found this blogpost how to solve the probmem:
https://forums.gentoo.org/viewtopic-t-1170095-start-0.html

In my situation it was go to: C:\Program Files\nodejs\node_modules\npm\node_modules\cacache\lib\memoization.js and remove brackets:

const { LRUCache } = require('lru-cache')

change to:

const LRUCache = require('lru-cache')



Image show messages from console before and after the change:


Brak komentarzy:

Prześlij komentarz