Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

desperate. prevent npm from removing files upon error

Tags:

node.js

npm

I am absolutely desperate for help. I have spend several days and nights trying to figure out what's most likely a trivial problem.

I am installing a big node package which has several dependencies. Some of those dependencies, however, fail due to a problems with their binding.gyp files which I know how to fix. The problem is that npm DELETES the files as soon as the error is detected, instead of leaving them for me to fix. Specifically, upon using the --verbose option I find that npm does "npm verb unbuild" and then "npm verb rmStuff", followed by "npm verb gentlyRm ...", I DO NOT want this to happen, as I have no chance to fix the corresponding binging.gym files and rebuild.

I am running the latest versions of node and npm. To reproduce this error on a Windows 7 box, try: npm install [email protected] --verbose

I am a programmer but I'm relatively new to node. I'm sure it's something simple I'm missing. I have exhausted all avenues and hit dead ends every time. Any assistance would be sincerely appreciated.

like image 347
victor1343 Avatar asked Jan 09 '23 22:01

victor1343


1 Answers

I'm amazed nobody else has this problem. Anyway, I made it stop deleting the files by using --ignore-scripts

like image 99
victor1343 Avatar answered Feb 04 '23 03:02

victor1343