-
Notifications
You must be signed in to change notification settings - Fork 3k
NPM 3.10.8 tries to install optional dep on unsupported platform when using npm-shrinkwrap.json #14042
Comments
Just verified that this is happening on our production server that runs Linux. |
Some more info, I created the shrinkwrap file with According to |
Just tried a 100% exactly build but without the |
Exactly same situation here, builds failing in Heroku because of |
We are seeing the same issue. Like @chodorowicz mentioned, downgrading to 3.10.7 works. |
Also happens for us, we had to downgrade to 3.10.7 |
For now we've been generating npm-shrinkwrap.json on Linux and it works Il 23 set 2016 11:13, "Artem Levik" notifications@github.com ha scritto:
|
We're seeing this as well in our Travis builds. |
With NPM v3.10.8 optional dependencies specified in shrinkwrap are installed even when they shouldn't be. This cause Karma installation to fail on Travis servers, which in turn leads to failing builds. The issue is tracked here: npm/npm#14042
We also have this problem. At work we have Windows devs, Mac devs, CircleCI Linux, and AWS Linux. A hack fix for us is to manually delete I was hoping in 3.10.8 npm install would check if the optional shrinkwrap dep was compatible before installing. Because now the deps contain a optional boolean field. Much like an npm install works when there is no shrinkwrap, for example it checks the fsevents os field against the target OS. However I understand there is an argument that this would be defeating the point of shrinkwrap if it's output varies depending on the target machine. We are moving to Docker soon so this will problem will disappear for us. Interested to see what the solution is though. |
FTR, having the same problem (duplicate reported at #14089 ) and our team needs to stay at 3.10.7 because of this. |
I ran into this issue for
to my project's |
Just hit this over at twbs/bootstrap. Exactly the same issue of shrinkwrapping on a mac and then installing on Travis. |
Fix Travis errors due to npm/npm#14042.
Same. Downgrading to 3.10.7 fixed it for now. |
With npm v3.10.8, optional dependencies specified in shrinkwrap are installed even when they shouldn’t be. This causes Karma installation to fail on Travis servers, which in turn leads to failing builds. See npm/npm#14042.
To try to avoid the npm install issues on travis: npm/npm#14042
* There was bug in npm@3.10.8 that comes with node v6.9.1 that prevents omitting optional deps from the shrinkwrap, which we need to avoid the binary dep in dtrace-provider * This was done after upgrading to npm@3.10.10 -g * See npm/npm#14042 Change-Id: I9e60e8df999d0cd0786295274f427b1f964fa960
--So, wouldn't the best fix be for Mac users to ask that this feature just works natively? The rest of us are incurring problems because we needed to add a work around for Mac users. You all realize this is a work around for a work around-- which to me seems silly-- and this has been in place a long time, Mac OS devs (the guys that actually work on the code that compiles to be the OS, mind you)... you're wearing egg all over your faces, you should get that off. Just another example of why I feel Macs are the second best dev platform. Win machines a distant fourth or fifth... |
Same Here
|
Same here: |
hi! I got the error $ npm install npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for inotify@1.4.2: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"}) npm ERR! notsup Valid OS: linux npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: darwin npm ERR! notsup Actual Arch: x64 npm ERR! A complete log of this run can be found in: npm ERR! /Users/viniciuscarvalho/.npm/_logs/2017-09-21T01_39_04_629Z-debug.log last lines of the log 8541 verbose unlock done using /Users/viniciuscarvalho/.npm/_locks/staging-155aa32e51b9d4ae.lock for /Users/viniciuscarvalho/Dropbox/server/node_modules/.staging 8542 verbose stack Error: Unsupported platform for inotify@1.4.2: wanted {"name":"inotify","version":"1.4.2","author":{"name":"Camilo Aguilar","email":"camilo.aguilar@gmail.com"},"email":"camilo.aguilar@gmail.com","keywords":["inotify","watch","monitor","watch files","watch directories"],"license":"MIT","description":"inotify bindings for v8 javascript engine","repository":{"type":"git","url":"git+ssh://git@github.com/c4milo/node-inotify.git"},"os":["linux"],"engines":{"node":">=0.8"},"main":"inotify","dependencies":{"bindings":"^1.2.1","nan":"^2.3.3"},"scripts":{"test":"node-gyp configure build","install":"node-gyp rebuild"},"gypfile":true,"contributors":[{"name":"Adrian Estrada","email":"edsadr@gmail.com"},{"name":"Alexander Makarenko","email":"estliberitas@gmail.com"},{"name":"Brian Ingalls","email":"bingalls@compete.com"},{"name":"Brian White","email":"mscdex@mscdex.net"},{"name":"Camilo Aguilar","email":"camilo.aguilar@gmail.com"},{"name":"Dan VerWeire","email":"dverweire@gmail.com"},{"name":"FrozenCow","email":"frozencow@gmail.com"},{"name":"Michael Boe","email":"mschuylerb@gmail.com"},{"name":"Yannick Croissant","email":"k1der.country@free.fr"},{"name":"ikokostya","email":"ikokostya@gmail.com"}],"bugs":{"url":"https://github.com/c4milo/node-inotify/issues"},"homepage":"https://github.com/c4milo/node-inotify#readme","_id":"inotify@1.4.2","bundleDependencies":false,"deprecated":false,"_resolved":"https://registry.npmjs.org/inotify/-/inotify-1.4.2.tgz","_integrity":"sha512-+dq8cO+Um/EiGujOilVGw1AclDq9V4B23z4I+PpytUlgIrWfOG/KxW4k7pRZwHHSoqUzlScCWYuQS8Wa+hYcXg==","_shasum":"fd69d0f6e4a55005e338b3c1852fbb81acfb3ccc","_from":"inotify@>= 0.1.6","_requested":{"type":"range","registry":true,"raw":"inotify@>= 0.1.6","name":"inotify","escapedName":"inotify","rawSpec":">= 0.1.6","saveSpec":null,"fetchSpec":">= 0.1.6"},"_spec":"inotify@>= 0.1.6","_where":"/Users/viniciuscarvalho/Dropbox/server/node_modules/dev"} (current: {"os":"darwin","cpu":"x64"}) 8542 verbose stack at checkPlatform (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/npm-install-checks/index.js:45:14) 8542 verbose stack at tryCatcher (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 8542 verbose stack at ret (eval at makeNodePromisifiedEval (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promisify.js:184:12), :13:39) 8542 verbose stack at readJson.then.catch.then (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/lib/install/action/refresh-package-json.js:31:12) 8542 verbose stack at tryCatcher (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 8542 verbose stack at Promise._settlePromiseFromHandler (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31) 8542 verbose stack at Promise._settlePromise (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18) 8542 verbose stack at Promise._settlePromise0 (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10) 8542 verbose stack at Promise._settlePromises (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18) 8542 verbose stack at Promise._fulfill (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18) 8542 verbose stack at Promise._settlePromise (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:582:21) 8542 verbose stack at Promise._settlePromise0 (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10) 8542 verbose stack at Promise._settlePromises (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18) 8542 verbose stack at Promise._fulfill (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18) 8542 verbose stack at Promise._resolveCallback (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:432:57) 8542 verbose stack at Promise._settlePromiseFromHandler (/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:524:17) 8543 verbose pkgid inotify@1.4.2 8544 verbose cwd /Users/viniciuscarvalho/Dropbox/server 8545 verbose Darwin 16.7.0 8546 verbose argv "/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/bin/node" "/Users/viniciuscarvalho/.nvm/versions/node/v8.5.0/bin/npm" "install" 8547 verbose node v8.5.0 8548 verbose npm v5.4.2 8549 error code EBADPLATFORM 8550 error notsup Unsupported platform for inotify@1.4.2: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"}) 8551 error notsup Valid OS: linux 8551 error notsup Valid Arch: any 8551 error notsup Actual OS: darwin 8551 error notsup Actual Arch: x64 8552 verbose exit [ 1, true ] |
Hi, same issue. BUT, in my log, why it display: |
same here... |
[ERROR] npm : npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules\fsevents): |
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules\fsevents): |
Is there a root cause analysis for this issue? Curious to know |
I'm opening this issue because:
What's going wrong?
This problem started appearing with NPM 3.10.8, with 3.10.7 it worked well. With 3.10.8 TravisCI tries to install
fsevents
which is an optional dependency of a dev dependency that only works on OS X / mac OS and so it fails.If it can help we're using npm shrinkwrap where the package is listed as
optional: true
An example of a failing build is https://travis-ci.org/HabitRPG/habitrpg/builds/161951399, I don't have access to npm-debug.log
The text was updated successfully, but these errors were encountered: