You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
This error occurred using npm v5.6.0 in a module that had a postinstall life-cycle step. Consistently I would get this error indicating there are too many process.on('SIGINT', ...) event registrations that aren't being removed. If I remove my postinstall step the error disappeared. If I substituted my postinstall step with an empty script I still received this error.
On line 297 the SIGINT event handler is registered:
process.once('SIGINT', procInterupt)
But on line 318 it removes a listener function for the wrong signal:
process.removeListener('SIGTERM', procInterupt)
Clearly, this is a mistake. It should instead be:
process.removeListener('SIGINT', procInterupt)
I made this change to my local copy of npm and verified that I know longer receive the warning. The SIGINT event function is now properly being removed during the npm lifecycle processing.
Let me know if you have any further questions . . .
The text was updated successfully, but these errors were encountered:
Yes, you are correct. Strictly speaking, this is a warning. The difficulty, of course, is discerning whether the warning can be safely ignored or indicates another issue (or bug). Regardless, I thought it was worth fixing in order to reduce the "noise" during my module install.
Thanks for the prompt investigation and confirmation of the bug . . .
This error occurred using npm v5.6.0 in a module that had a postinstall life-cycle step. Consistently I would get this error indicating there are too many process.on('SIGINT', ...) event registrations that aren't being removed. If I remove my postinstall step the error disappeared. If I substituted my postinstall step with an empty script I still received this error.
Digging into:
https://github.com/npm/npm/blob/latest/node_modules/npm-lifecycle/index.js
On line 297 the SIGINT event handler is registered:
But on line 318 it removes a listener function for the wrong signal:
Clearly, this is a mistake. It should instead be:
I made this change to my local copy of npm and verified that I know longer receive the warning. The SIGINT event function is now properly being removed during the npm lifecycle processing.
Let me know if you have any further questions . . .
The text was updated successfully, but these errors were encountered: