{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/720","repository_url":"https://api.github.com/repos/mapbox/node-sqlite3","labels_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/720/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/720/comments","events_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/720/events","html_url":"https://github.com/mapbox/node-sqlite3/issues/720","id":181184462,"number":720,"title":"3.1.5 breaks global install of dependents on Windows","user":{"login":"cwalther","id":234094,"avatar_url":"https://avatars.githubusercontent.com/u/234094?v=3","gravatar_id":"","url":"https://api.github.com/users/cwalther","html_url":"https://github.com/cwalther","followers_url":"https://api.github.com/users/cwalther/followers","following_url":"https://api.github.com/users/cwalther/following{/other_user}","gists_url":"https://api.github.com/users/cwalther/gists{/gist_id}","starred_url":"https://api.github.com/users/cwalther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwalther/subscriptions","organizations_url":"https://api.github.com/users/cwalther/orgs","repos_url":"https://api.github.com/users/cwalther/repos","events_url":"https://api.github.com/users/cwalther/events{/privacy}","received_events_url":"https://api.github.com/users/cwalther/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-05T15:16:21Z","updated_at":"2016-10-06T22:02:28Z","closed_at":null,"body":"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` from `npm 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.\r\n\r\nI have not understood yet how exactly the error comes about, but it appears to be caused by 9a038b50.\r\n\r\nMinimal reproducing example:\r\n```\r\nC:\\Users\\Walther\\sqtest315>dir\r\n Volume in drive C has no label.\r\n Volume Serial Number is 7CE2-F96E\r\n\r\n Directory of C:\\Users\\Walther\\sqtest315\r\n\r\n05.10.2016  16:32    <DIR>          .\r\n05.10.2016  16:32    <DIR>          ..\r\n05.10.2016  16:28                85 package.json\r\n               1 File(s)             85 bytes\r\n               2 Dir(s)  26'892'546'048 bytes free\r\n\r\nC:\\Users\\Walther\\sqtest315>type package.json\r\n{\r\n\"name\": \"sqtest315\",\r\n\"version\": \"1.0.0\",\r\n\"dependencies\": {\"sqlite3\": \"3.1.5\"}\r\n}\r\nC:\\Users\\Walther\\sqtest315>npm pack\r\nsqtest315-1.0.0.tgz\r\n\r\nC:\\Users\\Walther\\sqtest315>npm install -g sqtest315-1.0.0.tgz\r\n\r\n> sqlite3@3.1.5 preinstall C:\\Users\\Walther\\node\\node_modules\\.staging\\sqlite3-a06df773\r\n> npm install node-pre-gyp\r\n\r\nC:\\Users\\Walther\\node\r\n`-- node-pre-gyp@0.6.30\r\n  +-- mkdirp@0.5.1\r\n  | `-- minimist@0.0.8\r\n  +-- nopt@3.0.6\r\n  | `-- abbrev@1.0.9\r\n  +-- npmlog@4.0.0\r\n  | +-- are-we-there-yet@1.1.2\r\n  | | `-- delegates@1.0.0\r\n  | +-- console-control-strings@1.1.0\r\n  | +-- gauge@2.6.0\r\n  | | +-- aproba@1.0.4\r\n  | | +-- has-color@0.1.7\r\n  | | +-- has-unicode@2.0.1\r\n  | | +-- object-assign@4.1.0\r\n  | | +-- signal-exit@3.0.1\r\n  | | +-- string-width@1.0.2\r\n  | | | +-- code-point-at@1.0.1\r\n  | | | | `-- number-is-nan@1.0.1\r\n  | | | `-- is-fullwidth-code-point@1.0.0\r\n  | | +-- strip-ansi@3.0.1\r\n  | | | `-- ansi-regex@2.0.0\r\n  | | `-- wide-align@1.1.0\r\n  | `-- set-blocking@2.0.0\r\n  +-- rc@1.1.6\r\n  | +-- deep-extend@0.4.1\r\n  | +-- ini@1.3.4\r\n  | +-- minimist@1.2.0\r\n  | `-- strip-json-comments@1.0.4\r\n  +-- request@2.75.0\r\n  | +-- aws-sign2@0.6.0\r\n  | +-- aws4@1.4.1\r\n  | +-- bl@1.1.2\r\n  | | `-- readable-stream@2.0.6\r\n  | +-- caseless@0.11.0\r\n  | +-- combined-stream@1.0.5\r\n  | | `-- delayed-stream@1.0.0\r\n  | +-- extend@3.0.0\r\n  | +-- forever-agent@0.6.1\r\n  | +-- form-data@2.0.0\r\n  | | `-- asynckit@0.4.0\r\n  | +-- har-validator@2.0.6\r\n  | | +-- chalk@1.1.3\r\n  | | | +-- ansi-styles@2.2.1\r\n  | | | +-- escape-string-regexp@1.0.5\r\n  | | | +-- has-ansi@2.0.0\r\n  | | | `-- supports-color@2.0.0\r\n  | | +-- commander@2.9.0\r\n  | | | `-- graceful-readlink@1.0.1\r\n  | | +-- is-my-json-valid@2.15.0\r\n  | | | +-- generate-function@2.0.0\r\n  | | | +-- generate-object-property@1.2.0\r\n  | | | | `-- is-property@1.0.2\r\n  | | | +-- jsonpointer@4.0.0\r\n  | | | `-- xtend@4.0.1\r\n  | | `-- pinkie-promise@2.0.1\r\n  | |   `-- pinkie@2.0.4\r\n  | +-- hawk@3.1.3\r\n  | | +-- boom@2.10.1\r\n  | | +-- cryptiles@2.0.5\r\n  | | +-- hoek@2.16.3\r\n  | | `-- sntp@1.0.9\r\n  | +-- http-signature@1.1.1\r\n  | | +-- assert-plus@0.2.0\r\n  | | +-- jsprim@1.3.1\r\n  | | | +-- extsprintf@1.0.2\r\n  | | | +-- json-schema@0.2.3\r\n  | | | `-- verror@1.3.6\r\n  | | `-- sshpk@1.10.1\r\n  | |   +-- asn1@0.2.3\r\n  | |   +-- assert-plus@1.0.0\r\n  | |   +-- bcrypt-pbkdf@1.0.0\r\n  | |   +-- dashdash@1.14.0\r\n  | |   | `-- assert-plus@1.0.0\r\n  | |   +-- ecc-jsbn@0.1.1\r\n  | |   +-- getpass@0.1.6\r\n  | |   | `-- assert-plus@1.0.0\r\n  | |   +-- jodid25519@1.0.2\r\n  | |   +-- jsbn@0.1.0\r\n  | |   `-- tweetnacl@0.14.3\r\n  | +-- is-typedarray@1.0.0\r\n  | +-- isstream@0.1.2\r\n  | +-- json-stringify-safe@5.0.1\r\n  | +-- mime-types@2.1.12\r\n  | | `-- mime-db@1.24.0\r\n  | +-- node-uuid@1.4.7\r\n  | +-- oauth-sign@0.8.2\r\n  | +-- qs@6.2.1\r\n  | +-- stringstream@0.0.5\r\n  | +-- tough-cookie@2.3.1\r\n  | `-- tunnel-agent@0.4.3\r\n  +-- rimraf@2.5.4\r\n  | `-- glob@7.1.0\r\n  |   +-- fs.realpath@1.0.0\r\n  |   +-- inflight@1.0.5\r\n  |   +-- minimatch@3.0.3\r\n  |   | `-- brace-expansion@1.1.6\r\n  |   |   +-- balanced-match@0.4.2\r\n  |   |   `-- concat-map@0.0.1\r\n  |   +-- once@1.4.0\r\n  |   `-- path-is-absolute@1.0.1\r\n  +-- semver@5.3.0\r\n  +-- tar@2.2.1\r\n  | +-- block-stream@0.0.9\r\n  | +-- fstream@1.0.10\r\n  | | `-- graceful-fs@4.1.9\r\n  | `-- inherits@2.0.3\r\n  `-- tar-pack@3.1.4\r\n    +-- debug@2.2.0\r\n    | `-- ms@0.7.1\r\n    +-- fstream-ignore@1.0.5\r\n    +-- once@1.3.3\r\n    | `-- wrappy@1.0.2\r\n    +-- readable-stream@2.1.5\r\n    | +-- buffer-shims@1.0.0\r\n    | +-- core-util-is@1.0.2\r\n    | +-- isarray@1.0.0\r\n    | +-- process-nextick-args@1.0.7\r\n    | +-- string_decoder@0.10.31\r\n    | `-- util-deprecate@1.0.2\r\n    `-- uid-number@0.0.6\r\n\r\nnpm ERR! Windows_NT 10.0.10240\r\nnpm ERR! argv \"C:\\\\Users\\\\Walther\\\\node\\\\node.exe\" \"C:\\\\Users\\\\Walther\\\\node\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"install\" \"node-pre-gyp\"\r\nnpm ERR! node v4.4.7\r\nnpm ERR! npm  v3.10.8\r\nnpm ERR! path C:\\Users\\Walther\\node\\node_modules\\.staging\\sqlite3-a06df773\r\nnpm ERR! code EBUSY\r\nnpm ERR! errno -4082\r\nnpm ERR! syscall rmdir\r\n\r\nnpm ERR! EBUSY: resource busy or locked, rmdir 'C:\\Users\\Walther\\node\\node_modules\\.staging\\sqlite3-a06df773'\r\nnpm ERR!\r\nnpm ERR! If you need help, you may report this error at:\r\nnpm ERR!     <https://github.com/npm/npm/issues>\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     C:\\Users\\Walther\\node\\node_modules\\.staging\\sqlite3-a06df773\\npm-debug.log\r\nnpm ERR! Windows_NT 10.0.10240\r\nnpm ERR! argv \"C:\\\\Users\\\\Walther\\\\node\\\\node.exe\" \"C:\\\\Users\\\\Walther\\\\node\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"install\" \"-g\" \"sqtest315-1.0.0.tgz\"\r\nnpm ERR! node v4.4.7\r\nnpm ERR! npm  v3.10.8\r\nnpm ERR! code ELIFECYCLE\r\n\r\nnpm ERR! sqlite3@3.1.5 preinstall: `npm install node-pre-gyp`\r\nnpm ERR! Exit status 4294963214\r\nnpm ERR!\r\nnpm ERR! Failed at the sqlite3@3.1.5 preinstall script 'npm install node-pre-gyp'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the sqlite3 package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     npm install node-pre-gyp\r\nnpm ERR! You can get information on how to open an issue for this project with:\r\nnpm ERR!     npm bugs sqlite3\r\nnpm ERR! Or if that isn't available, you can get their info via:\r\nnpm ERR!     npm owner ls sqlite3\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     C:\\Users\\Walther\\sqtest315\\npm-debug.log\r\n\r\nC:\\Users\\Walther\\sqtest315>\r\n```\r\n\r\n[npm-debug.log.zip](https://github.com/mapbox/node-sqlite3/files/511532/npm-debug.log.zip)"},"comment":{"url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/comments/252101489","html_url":"https://github.com/mapbox/node-sqlite3/issues/720#issuecomment-252101489","issue_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/720","id":252101489,"user":{"login":"springmeyer","id":20300,"avatar_url":"https://avatars.githubusercontent.com/u/20300?v=3","gravatar_id":"","url":"https://api.github.com/users/springmeyer","html_url":"https://github.com/springmeyer","followers_url":"https://api.github.com/users/springmeyer/followers","following_url":"https://api.github.com/users/springmeyer/following{/other_user}","gists_url":"https://api.github.com/users/springmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/springmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/springmeyer/subscriptions","organizations_url":"https://api.github.com/users/springmeyer/orgs","repos_url":"https://api.github.com/users/springmeyer/repos","events_url":"https://api.github.com/users/springmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/springmeyer/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T22:02:28Z","updated_at":"2016-10-06T22:02:28Z","body":"> 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.\r\n\r\n@sam-github can you point me to npm documentation on this restriction? I've tried an been unable to replicate this problem.\r\n\r\n> The change was committed directly without a PR, so its hard to understand the justificatio.\r\n\r\nBundling 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. 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)\r\n\r\nSecondarily 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.\r\n\r\nSome background at https://github.com/mapbox/node-pre-gyp/issues/162 and https://github.com/mapbox/node-pre-gyp/pull/163\r\n"}}
{"actor":{"display_login":"springmeyer"}}