-
-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.1.5 breaks global install of dependents on Windows #720
Comments
@springmeyer 9a038b5 is broken, you can't list node-pre-gyp as a dep, and install it in preinstall, I suspect what is happening is that sometimes npm is installing it at the same time as the preinstall script is trying. The change was committed directly without a PR, so its hard to understand the justificatio. I'm going to guess its because of the well known problem with npm 2.x that it does not guarantee a package's dependencies are installed before a package's install script runs, so its an attempt to work around this. The only robust fix is to bundle any deps that must be present at the time a package's install script runs. Which is what the code used to do... so why was it changed? |
* Newer verions of mapbox/node-sqlite3 are breaking API Connect and LoopBack installations * Caused by 9a038b5 listing `node-pre-gyp` as a dep and installing it during `preinstall` * See issue at TryGhost/node-sqlite3#720 for * more details
* Newer versions of mapbox/node-sqlite3 are breaking API Connect and LoopBack installations * Caused by 9a038b5 listing `node-pre-gyp` as a dep and installing it during `preinstall` * See issue at TryGhost/node-sqlite3#720 for more details
* Newer versions of mapbox/node-sqlite3 are breaking API Connect and LoopBack installations * Caused by 9a038b5 listing `node-pre-gyp` as a dep and installing it during `preinstall` * See issue at TryGhost/node-sqlite3#720 for more details
@sam-github can you point me to npm documentation on this restriction? I've tried and been unable to replicate this problem.
Bundling is a headache because security issues in the bundled dependencies cannot be fixed without re-tagging node-pre-gyp, and every single module that depends on it upgrading. Across modules depending on node-pre-gyp this was resulting in a lot of unnecessary time lost and confusion from users that don't know why vulnerable modules are being included (since they are way downstream of the module that includes node-pre-gyp). Secondarily the size of the package is then large and users were complaining. But this is going to be this way once installed of course, so this is less of a problem. Some background at mapbox/node-pre-gyp#162 and mapbox/node-pre-gyp#163 |
@sam-github any idea what In the meantime I'm working on a v3.1.6 release that bundles again to avoid the breakages. |
The failing One thing you can try w.r.t. install scripts in the future like you did with node-pre-gyp is to do |
@rmg ah, that sounds really smart. Do you think that could potentially avoid this Windows-specific |
v3.1.6 is published. Can someone who can replicate confirm this is fixed and let me know here? |
@springmeyer just as a general best practice. I'm not sure if it would help with the I'll see if I can wrangle some people into testing 3.1.6. |
@springmeyer I just tested on node 5.11.1 and npm 3.8.6 and |
* Fixes installation issues with `npm install -g strongloop` and `npm install -g apiconnect * They now bundle `node-pre-gyp`, see https://github.com/mapbox/node-sqlite3/commits/de2055b * Initial bug discussion at TryGhost/node-sqlite3#720
* Fixes installation issues with `npm install -g strongloop` and `npm install -g apiconnect * They now bundle `node-pre-gyp`, see https://github.com/mapbox/node-sqlite3/commits/de2055b * Initial bug discussion at TryGhost/node-sqlite3#720
* Fixes installation issues with `npm install -g strongloop` and `npm install -g apiconnect` * They now bundle `node-pre-gyp`, see https://github.com/mapbox/node-sqlite3/commits/de2055b * Initial bug discussion at TryGhost/node-sqlite3#720
* Fixes installation issues with `npm install -g strongloop` and `npm install -g apiconnect` * They now bundle `node-pre-gyp`, see https://github.com/mapbox/node-sqlite3/commits/de2055b * Initial bug discussion at TryGhost/node-sqlite3#720
👍 Confirmed that things work again with 3.1.6 in both my minimal example (interesting that it didn’t reproduce the problem for you, btw – any differences in node/npm/os versions?) and my real case (a private package). Thanks! I leave it to you whether to close this issue now or keep it open while looking for a better solution. |
I tried the
|
On Windows 10 (x86 and x64), installing a package that depends on sqlite3@3.1.5 (or something that resolves to 3.1.5, like ^3.1.4) globally (npm install -g) fails with error
EBUSY: resource busy or locked, rmdir
fromnpm install node-pre-gyp
. The same thing works as expected with 3.1.4. It also works with 3.1.5 on OS X. Installing locally also works as expected.I have not understood yet how exactly the error comes about, but it appears to be caused by 9a038b5.
Minimal reproducing example:
npm-debug.log.zip
The text was updated successfully, but these errors were encountered: