1

Every time when i want to start a new NPM node.js project I keep getting an gaigantic package-lock.json file.

When i run npm install it creates a package.json and a package-lock.json file. my problem is that the package-lock.json file autogenerates a file with more then 4000 lines of code. Also my node-modules folder is extremeley large with more than 260 folders inside. How to i reset my node-modules to there original state without this many packages and dependencies?

  • This is how NPM works. 4000 lines is not a big package-lock.json. Depending on which packages you're installing, those may have a lot of dependencies (and so on etc.) And NPM may move some of those up from the dependencies to the top level directory. So this sounds like "working as it's supposed to" – Joe Dec 22 '21 at 20:00
  • so there is no solution to reset all the node_modules packages? i have tryed to delete node and npm from computer and reinstall node and npm and create a new project. but i keep getting such a large package-lock.json file that its interupting even vs code editor. it ses: "package-lock.json: For performance reasons, document symbols and folding ranges have been limited to 5000 items. Use setting 'json.maxItemsComputed' to configure the limit." – Marc Gentner Dec 22 '21 at 21:02
  • You shouldn't need to edit package-lock.json in the code editor. What does your package.json look like? Some packages are complex and have a lot of dependencies. What makes you think what it's doing is wrong or needs to be reset? – Joe Dec 22 '21 at 22:03

0 Answers0