NPM 3.10.8 tries to install optional dep on unsupported platform when using npm-shrinkwrap.json #14042

Closed
paglias opened this Issue Sep 22, 2016 · 72 comments

Projects

None yet
@paglias
paglias commented Sep 22, 2016 edited

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

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.

matteo@macbook~/dev/habitrpg/habitrpg$ npm ls fsevents
habitica@3.42.1 /Users/matteo/dev/habitrpg/habitrpg
└─┬ karma@1.3.0
  └─┬ chokidar@1.6.0
    └── fsevents@1.0.14

If it can help we're using npm shrinkwrap where the package is listed as optional: true

"fsevents": {
  "version": "1.0.14",
  "from": "fsevents@>=1.0.0 <2.0.0",
  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz",
  "optional": true,
  "dependencies": {
    ...
  }
},

An example of a failing build is https://travis-ci.org/HabitRPG/habitrpg/builds/161951399, I don't have access to npm-debug.log

npm ERR! Linux 3.13.0-92-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v4.3.1/bin/node" "/home/travis/.nvm/versions/node/v4.3.1/bin/npm" "install"
npm ERR! node v4.3.1
npm ERR! npm  v3.10.8
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/HabitRPG/habitrpg/npm-debug.log

@paglias
paglias commented Sep 22, 2016

Just verified that this is happening on our production server that runs Linux.

@paglias paglias changed the title from NPM 3.10.8 broke our TravisCI build to NPM 3.10.8 tries to install optional dep on unsupported platform Sep 22, 2016
@paglias
paglias commented Sep 22, 2016

Some more info, I created the shrinkwrap file with npm shrinkwrap (no options) with a just installed node_modules folder on mac OS using npm 3.10.8

According to npm ls fsevents it's a dependency of a dev dep (karma) that isn't included in the shrinkwrap so I'm also wondering why fsevents was added at all

@paglias paglias changed the title from NPM 3.10.8 tries to install optional dep on unsupported platform to NPM 3.10.8 tries to install optional dep on unsupported platform when using npm-shrinkwrap.json Sep 22, 2016
@paglias
paglias commented Sep 22, 2016

Just tried a 100% exactly build but without the npm-shrinkwrap.json file and it works so the problem seems to be with it https://travis-ci.org/HabitRPG/habitrpg/builds/161957509

@AimeeShen AimeeShen referenced this issue in trendmicro/serverless-survey-forms Sep 23, 2016
Merged

HWMS reported case fixed, limited npm version@3.10.7 #54

@chodorowicz
chodorowicz commented Sep 23, 2016 edited

Exactly same situation here, builds failing in Heroku because of fsevents being dependency of dev browser-sync
npm ERR! notsup Unsupported platform for fsevents@1.0.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
Downgrading to npm 3.10.7 solves the issue.

@sebreh
sebreh commented Sep 23, 2016

We are seeing the same issue. Like @chodorowicz mentioned, downgrading to 3.10.7 works.

@psylence303

Also happens for us, we had to downgrade to 3.10.7

@paglias
paglias commented Sep 23, 2016

For now we've been generating npm-shrinkwrap.json on Linux and it works
with 3.10.8 but would like to have a lasting solution

Il 23 set 2016 11:13, "Artem Levik" notifications@github.com ha scritto:

Also happens for us, we had to downgrade to 3.10.7


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14042 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAkAV80ObHeIPXPqp4EGohPNeh5eHYtCks5qs5gsgaJpZM4KEE5i
.

@mhart mhart referenced this issue in mhart/alpine-node Sep 23, 2016
Closed

npm v1.10.7 EventEmitter Errors #61

@zdavis
zdavis commented Sep 26, 2016

We're seeing this as well in our Travis builds.

@zdavis zdavis added a commit to ManifoldScholar/manifold that referenced this issue Sep 26, 2016
@zdavis zdavis [C] Specify travis NPM version
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
357e9cb
@albertstill

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 fsevents (or what ever non-cross platform dep) from the shrinkwrap when we do an install on Mac.

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.

@mfn
mfn commented Sep 28, 2016

FTR, having the same problem (duplicate reported at #14089 ) and our team needs to stay at 3.10.7 because of this.

@albertzak albertzak added a commit to rslnd/rosalind that referenced this issue Oct 2, 2016
@albertzak albertzak 🙃 Temporarily downgrade npm to 3.10.7 48ec277
@albertzak albertzak added a commit to rslnd/rosalind that referenced this issue Oct 2, 2016
@albertzak albertzak 🙃 Temporarily downgrade npm to 3.10.7 3ad130c
@joefiorini
joefiorini commented Oct 5, 2016 edited

I ran into this issue for fsevents as well, and it seems that adding:

  "optionalDependencies": {
    "fsevents": "*"
  },

to my project's package.json and then installing with --no-optional fixed it for me without downgrading to 3.10.7 (still on 3.10.8 on my server).

@bardiharborow

Just hit this over at twbs/bootstrap. Exactly the same issue of shrinkwrapping on a mac and then installing on Travis.

@wavded
wavded commented Oct 10, 2016

Same. Downgrading to 3.10.7 fixed it for now.

@hypery2k hypery2k added a commit to holisticon/angularjs-common that referenced this issue Oct 11, 2016
@hypery2k hypery2k Fix NPM error, see npm/npm#14042 6dfb503
@josephfrazier josephfrazier referenced this issue in OctoLinker/browser-extension Oct 12, 2016
Closed

Travis builds are failing #194

@mathiasbynens mathiasbynens added a commit to jsperf/jsperf.com that referenced this issue Oct 13, 2016
@mathiasbynens mathiasbynens CI: Fix npm error 9be19c6
@mathiasbynens mathiasbynens added a commit to jsperf/jsperf.com that referenced this issue Oct 13, 2016
@mathiasbynens mathiasbynens CI: Work around npm error
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.
b998e40
@mathiasbynens mathiasbynens added a commit to jsperf/jsperf.com that referenced this issue Oct 13, 2016
@mathiasbynens mathiasbynens CI: Work around npm error
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.
f5d5465
@jaderabbit jaderabbit referenced this issue in RetroRabbit/rabbiteer-2016 Oct 13, 2016
Merged

Firebase #60

@amakhrov

Downgrading npm from 3.10.8 to 3.10.7 solved the issue so far

@HassanGulzar HassanGulzar referenced this issue in angular/angular-cli Oct 16, 2016
Closed

Error installing package (force or no force) #2725

@mbfisher mbfisher added a commit to write-track/prolifiko.com that referenced this issue Oct 16, 2016
@mbfisher mbfisher Add fsvents to optionalDependencies. 7362395
@jwang1919 jwang1919 added a commit to jwang1919/popcode that referenced this issue Oct 16, 2016
@jwang1919 jwang1919 Mark fsevents as an optional dependency, otherwise all non-MacOS syst…
…ems will fail npm install. See npm/npm#14042
5554fa8
@jwang1919 jwang1919 referenced this issue in popcodeorg/popcode Oct 16, 2016
Merged

Added compatibility for non-MacOS X developers #208

@outoftime outoftime added a commit to popcodeorg/popcode that referenced this issue Oct 16, 2016
@jwang1919 @outoftime jwang1919 + outoftime Added compatibility for non-MacOS X developers (#208)
* Ignoring .idea files (IntelliJ).

* Mark fsevents as an optional dependency, otherwise all non-MacOS systems will fail npm install. See npm/npm#14042

* Enforce line endings to LF to pass npm test

* Fine tune .gitattributes to target .js files

* Another fine tune of .gitattributes file

* Another fine tune of .gitattributes file part 2

* Added me as contributor

* Added new lines at end of .git files

* Adding suggested changes. Removed *.idea from .gitignore. Added myself as contributor to package.json
dc75eb2
@MilosMosovsky

Confirming that downgrading npm works.

@mgol
mgol commented Oct 17, 2016

What's funny is that even if I invoke npm install --no-optional on a project using shrinkwrap it fails on fsevents which it shouldn't even be looking at...

@j2l
j2l commented Oct 18, 2016

Donwgrading to 3.10.7 then npm install threw a warn on linux:
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14

@freezy-sk freezy-sk referenced this issue in twbs/bootlint Oct 19, 2016
Open

Workaround npm error in Travis #393

@AlexChesters AlexChesters added a commit to AlexChesters/ukpd-api that referenced this issue Oct 20, 2016
@AlexChesters AlexChesters Fix travis build 2bad45f
@AlexChesters
Contributor
AlexChesters commented Oct 20, 2016 edited

@joefiorini

I ran into this issue for fsevents as well, and it seems that adding:
"optionalDependencies": {
"fsevents": "*"
},
to my project's package.json and then installing with --no-optional fixed it for me without downgrading to 3.10.7 (still on 3.10.8 on my server).

This does work, however it looks like --no-optional is unnecessary.

@mgol
mgol commented Oct 21, 2016

Since it's a regression from a previous patch release and it does seem to affect a lot of people (basically everyone on a Linux or Windows using shrinkwrap who uses a package relying on fsevents) it'd be good to have it fixed in v3 even though v4 has already been released and npm@3 is in maintenance mode.

@outoftime outoftime referenced this issue in popcodeorg/popcode Oct 22, 2016
Closed

Added compatibility for non-MacOS X developers #260

@mdjnewman mdjnewman added a commit to mdjnewman/openmrs-module-bahmniapps that referenced this issue Oct 22, 2016
@mdjnewman mdjnewman MN | Travis build config changes 73f6813
@mdjnewman mdjnewman added a commit to mdjnewman/openmrs-module-bahmniapps that referenced this issue Oct 22, 2016
@mdjnewman mdjnewman MN | Travis build config changes 340deef
@mdjnewman mdjnewman referenced this issue in Bahmni/openmrs-module-bahmniapps Oct 22, 2016
Merged

Travis build config changes #34

@mdjnewman mdjnewman added a commit to mdjnewman/openmrs-module-bahmniapps that referenced this issue Oct 22, 2016
@mdjnewman mdjnewman MN | Travis build config changes
* Work around npm/npm#14042 using
  travis-ci/travis-ci#4653 (comment)
* Print out the npm debug log for when npm fails
* Cache the npm and bower directories to speed up the build
* Explicitly disable email notifications
* Use 'dots' reporter rather than 'progress' for Karma to keep console
  output smaller
152a840
@watilde
Contributor
watilde commented Oct 24, 2016

I actually have the same issue. Well, this issue should be labeled as a big-bug since probably it's easy to happen in the general cases, and I hope the patch for this issue will be merged into not only v4 but also v3 as well #14117

@kanaabe kanaabe referenced this issue in artsy/positron Oct 24, 2016
Merged

@craigspaeth => Bump down npm version #822

@mateatslc
mateatslc commented Oct 25, 2016 edited

anyone knows if this still persists on npm@3.10.9?

@franher
franher commented Oct 25, 2016

@mateatslc I just checked and it's not working with npm@3.10.9 yet.

16:16:56 npm ERR! node v4.6.0
16:16:56 npm ERR! npm  v3.10.9
16:16:56 npm ERR! code EBADPLATFORM
16:16:56 
16:16:56 npm ERR! notsup Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
16:16:56 npm ERR! notsup Valid OS:    darwin
16:16:56 npm ERR! notsup Valid Arch:  any
16:16:56 npm ERR! notsup Actual OS:   linux
16:16:56 npm ERR! notsup Actual Arch: x64
@iarna
Member
iarna commented Oct 25, 2016

There was actually a patch for something that sounds suspicious like this in 4.0.0…

@zkat
Member
zkat commented Oct 25, 2016

#14117 was released with npm@4.0.0, which should fix this issue. Closing as resolved. npm@4 will become latest next week (Nov 3), and things should be alright after that!

@zkat zkat closed this Oct 25, 2016
@iarna
Member
iarna commented Oct 25, 2016

I've reproed this with 3.10.9 and can confirm that is indeed fixed with #14117 in 4.0.0.

@oliverguenther oliverguenther added a commit to opf/openproject that referenced this issue Oct 26, 2016
@oliverguenther oliverguenther Force npm@4.0.0 due to shrinkwrap bug in 3.0.9 4b2235a
@watilde
Contributor
watilde commented Oct 26, 2016

@iarna @zkat Sounds nice! Will v3.x have bug fixes, like v2 had when it was LTS?

@steida steida referenced this issue in este/este Nov 13, 2016
@steida steida Remove shrinkwrap
This should fix CI
fed2e44
@msecret msecret added a commit to 18F/cg-dashboard that referenced this issue Nov 14, 2016
@msecret msecret Temporarily modify node version due to npm bug.
See the following error when running `npm install`

```
ERR! notsup Unsupported platform for fsevents@1.0.14: wanted
{"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
```

After investigation, it looks like this is a problem in npm `v3.10.8`.
More information here npm/npm#14042.

Changing nvmrc will downgrade back to npm `v3.10.3`, which should fix
the problem.

Should change nvmrc back when bug is resolved.
fd8101c
@msecret msecret added a commit to 18F/cg-dashboard that referenced this issue Nov 14, 2016
@msecret msecret Temporarily modify node version due to npm bug.
See the following error when running `npm install`

```
ERR! notsup Unsupported platform for fsevents@1.0.14: wanted
{"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
```

After investigation, it looks like this is a problem in npm `v3.10.8`.
More information here npm/npm#14042.

Changing nvmrc will downgrade back to npm `v3.10.3`, which should fix
the problem.

Should change nvmrc back when bug is resolved.
53f05cd
@peter-mouland
peter-mouland commented Nov 16, 2016 edited

@legodude17 I have unfortunately this error also when deploying to heroku:

npm ERR! node v6.9.1
       npm ERR! npm  v3.10.10
       npm ERR! code EBADPLATFORM

       npm ERR! notsup Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
       npm ERR! notsup Valid OS:    darwin
       npm ERR! notsup Valid Arch:  any
       npm ERR! notsup Actual OS:   linux
       npm ERR! notsup Actual Arch: x64

my shrinkwarp is in fsevents shrinkwrap gist

@dimsolution
dimsolution commented Nov 16, 2016 edited

@peter-mouland To fix this issue, you have 3 possibilities:

Method 1: add fsevent as optional dependence

Add "optionalDependencies" on your package.json:

"optionalDependencies": {
    "fsevents": "*"
  },

Now you can make

npm install --no-optional

Nota: before adding this new lines on your package.json, check you doesn't need fsevents package.

Method 2: downgrade npm

Method 3: use yarn
It does the same job as mentioned in method 1

@peter-mouland
peter-mouland commented Nov 16, 2016 edited

I was just highlighting that the issue still exists. as it sounded like it was thought to have been solved with v3.10.10. For now i've downgraded to v3.10.7 which fixed the issue. I prefer the downgrade route as that mean less cognitive effort, but thanks for the alternative.

@josephfrazier josephfrazier added a commit to josephfrazier/browser-extension that referenced this issue Nov 18, 2016
@josephfrazier josephfrazier travis: use npm@latest, not 3.10.7
npm@4.0.2 is currently the 'latest' tag, and it has the fix for
npm/npm#14042

Note that we can't remove the `before_install` section quite yet,
because no Node.js release currently includes npm@4.
3f230c8
@josephfrazier josephfrazier referenced this issue in OctoLinker/browser-extension Nov 18, 2016
Merged

travis: use npm@latest, not 3.10.7 #211

@peter-mouland

I'm also getting this error when using it at work (on jenkins)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
15:10:15 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
15:10:15 npm ERR! Linux 3.16.0-23-generic
15:10:15 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
15:10:15 npm ERR! node v7.1.0
15:10:15 npm ERR! npm  v3.10.9
15:10:15 npm ERR! code EBADPLATFORM
15:10:15 
15:10:15 npm ERR! notsup Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
15:10:15 npm ERR! notsup Valid OS:    darwin
15:10:15 npm ERR! notsup Valid Arch:  any
15:10:15 npm ERR! notsup Actual OS:   linux
15:10:15 npm ERR! notsup Actual Arch: x64
@peter-mouland peter-mouland referenced this issue in mhart/alpine-node Nov 18, 2016
Closed

npm v3.10.7 #73

@legodude17
Contributor

Is fsevents marked as optional in the npm-shrinkwrap.json?

On Fri, Nov 18, 2016 at 7:13 AM, Peter Mouland notifications@github.com
wrote:

I'm also getting this error when using it at work (on jenkins)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
15:10:15 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
15:10:15 npm ERR! Linux 3.16.0-23-generic
15:10:15 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
15:10:15 npm ERR! node v7.1.0
15:10:15 npm ERR! npm v3.10.9
15:10:15 npm ERR! code EBADPLATFORM
15:10:15
15:10:15 npm ERR! notsup Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
15:10:15 npm ERR! notsup Valid OS: darwin
15:10:15 npm ERR! notsup Valid Arch: any
15:10:15 npm ERR! notsup Actual OS: linux
15:10:15 npm ERR! notsup Actual Arch: x64


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#14042 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKr56FX0Y_QXeoCtVxgmSwSviVTFPCuIks5q_cC2gaJpZM4KEE5i
.

@evocateur

@peter-mouland you're using npm 3.10.9 in that jenkins stack, which explains why it's failing.

@stefanbuck stefanbuck added a commit to OctoLinker/browser-extension that referenced this issue Nov 18, 2016
@josephfrazier @stefanbuck josephfrazier + stefanbuck travis: use npm@latest, not 3.10.7 (#211)
(This is a follow-up to #195)

npm@4.0.2 is currently the 'latest' tag, and it has the [fix
npm/npm#14042

Note that we can't remove the `before_install` section quite yet,
because no Node.js release currently includes npm@4. On the other hand,
having Travis always use the latest npm might be a nice way to learn
about upcoming breakage...

I also had to regenerate npm-shrinkwrap.json, but it's
backwards-compatible, as shown here:
https://travis-ci.org/josephfrazier/browser-extension/builds/176915380

[fix

Commits:
- Regenerate npm-shrinkwrap.json with npm@latest (4.0.2)
Note that this shrinkwrap file is backwards-compatible with npm@3, so
developers shouldn't need to upgrade to npm@4 to install deps.
- travis: use npm@latest, not 3.10.7
npm@4.0.2 is currently the 'latest' tag, and it has the fix for
npm/npm#14042
Note that we can't remove the `before_install` section quite yet,
because no Node.js release currently includes npm@4.

Reviewer: Stefan Buck (stefanbuck)
f3daa56
@phobos2077
phobos2077 commented Nov 24, 2016 edited

Having the same issue. Tried many different versions of fsevents with no success.

$ npm install --no-optional
celgene@0.0.1 /home/vagrant/development
└── (empty)

npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-optional"
npm ERR! node v5.10.1
npm ERR! npm  v4.0.2
npm ERR! path ../semver/bin/semver
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../semver/bin/semver' -> '/home/vagrant/development/node_modules/accord/node_modules/.bin/semver'

Nevermind. Fixed by setting: npm config set bin-links false, manually deleting some incorrectly installed libraries and runnin npm install again. I'm using Vagrant on Win10 host.

@watilde
Contributor
watilde commented Nov 24, 2016

@phobos2077 That seems a different issue with this thread. Since I couldn't find the same issue with you, it's nice if you could open an issue as a new topic.

@vincentbernat vincentbernat referenced this issue in vincentbernat/dashkiosk Nov 24, 2016
Closed

Raspberry Pi 3 jessie lite / pixel #52

@vincentbernat vincentbernat added a commit to vincentbernat/dashkiosk that referenced this issue Nov 24, 2016
@vincentbernat vincentbernat build: make fsevents optional
This should workaround bug like #52 (related to npm/npm#14042).
14c3414
@Ehekatl
Ehekatl commented Nov 24, 2016

getting this error on 4.0.2 as well

npm WARN bobcat_support_tools@0.0.1 No license field.
☻      ♥npm☻      ) ERR! Linux 4.4.15-25.57.amzn1.x86_64
npm☻      ~ ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "--prefix" "./fe/support" "install" "./fe/support"
npm ERR! node v6.9.1
☻      §npm ERR! npm  v4.0.2
☻      pm ERR! code EBADPLATFORM
☻      ☺
☻      ☼npm ERR! notsup☻      y Unsupported platform for fsevents@1.0.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm☻      * ERR! notsup Valid OS:    darwin
npm ERR! ☻      ∟notsup Valid Arch:  any
npm ☻      .ERR! notsup Actual OS:   linux
npm ERR! notsup☻      ↕ Actual Arch: x64
☻      ☺
☻      jnpm ERR! Please include the following file with any support request:
npm ERR!     /home/app/npm-debug.log
···
@Ehekatl
Ehekatl commented Nov 24, 2016

@zkat npm4.0.2 doesn't fix this, please reopen this issue, I'm using npm-shrinkwarp, I have cleaned cache and remove node_modules and it still not work. However npm 3.10.7 works fine. We have two different build environment, only one has this problem, the only difference is the working one is using npm mirror. That's really strange.

@dimsolution
dimsolution commented Nov 24, 2016 edited

@zkat +1 : after updated npm 3.10.8 > 4.0.2 same problem...

@legodude17
Contributor

Everyone with this issue: Make sure that fsevents is marked as optional everywhere.

@chriddyp chriddyp added a commit to plotly/plotly-database-connector that referenced this issue Nov 24, 2016
@chriddyp chriddyp Attempt to fix linux build error
Builds on heroku were failing due to:

This thread: npm/npm#14042 recommended
switching to `3.10.10` and adding `fsevents: ‘*’` in optional deps.

Got to switch to Yarn soon!
c5b0316
@ngokli
ngokli commented Nov 25, 2016 edited

I feel like folks are confused and need some clarification, so I'll give it a shot! Please correct me as needed!

By "everywhere", @legodude17 means in package.json and npm-shrinkwrap.json (right?). So wherever you find fsevents in these two files, it needs to be marked as optional. And if you do that and use npm@3.10.10 (or, I assume, npm@4.0.2), you don't need --no-optional (I'd think you would generally avoid --no-optional, to just install everything that is compatible with your system. My understanding is using fsevents is more efficient on a Mac).

With npm@3.10.10 or npm@4.0.2, shrinkwrapping will automatically mark fsevents (and other optional modules) as optional in your npm-shrinkwrap.json, so you won't have to do it manually in the future. To avoid some manual work: If npm install works properly on your Mac, you could try just regenerating the npm-shrinkwrap.json with npm shrinkwrap there, and see if that works on your Lunix/Windows boxen.

@ngokli
ngokli commented Nov 25, 2016 edited

Now a question: Say I need a package with an optional dependency that requires OS X, and another package with an optional dependency that requires Linux, can npm shrinkwrap include both of those in my npm-shrinkwrap.json?

I'm not dealing with this issue myself (I've only used npm for for a pre-interview homework problem I was given the other day), but I assume this is an important use case, and I'm curious. Is it a use case that has been considered? Perhaps it's not a common issue? But some googling leads to a real use case: https://github.com/develar/7zip-bin/blob/master/package.json#L11

I'm asking this here because it just seems like an extension of this crazy discussion!

@legodude17
Contributor

Yes. Npm will install everything in optional unless it is incompatible with your system.

@legodude17
Contributor

@ngokli, I meant in those places, but also in package.json and npm-shrinkwrap.json of all of your deps.

@dweber019 dweber019 added a commit to w3tecch/aurelia-typescript-boilerplate that referenced this issue Dec 2, 2016
@dweber019 dweber019 remove fsevents because of npm/npm#14042 c149648
@ngerritsen
ngerritsen commented Dec 6, 2016 edited

How I fixed it:

  1. rm -rf node_modules npm-shrinkwrap.json
  2. npm install --no-optional
  3. npm shrinkwrap --dev

Now I can just npm install without needing the --no-optional flag every time.

@dimsolution
dimsolution commented Dec 6, 2016 edited

@ngerritsen Thank you !

@kvz kvz added a commit to freyproject/website that referenced this issue Dec 6, 2016
@kvz kvz Hopefully fix Unsupported platform for fsevents@1.0.15: wanted {"os":…
…"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})


https://travis-ci.org/freyproject/website/builds/181666294#L2355

npm/npm#14042
0cd2655
@chriddyp chriddyp added a commit to plotly/plotly-database-connector that referenced this issue Dec 8, 2016
@chriddyp chriddyp Persistent (#111)
* first pass on scheduled queries

* wire query scheduler into the app

* next pass

* next pass

* next pass

* loading sessions

* apache drill and s3

* 🐨 update

* next pass

* rewrite front-end

* apache spark and s3 previews

* ..

* next pass

* fix UI and put tab components into separate files

* heroku

* heroku cleanup

* typo

* rbuild

* log down node version

* case sensitive

* fix urls for headless and app mode

* protocol typo

* rm secretAccessKey from API

* update todo

* link shim

* pre-save check for persistence

* first pass at social auth

* Sets table previews as a separate component

* Fixes fixed widths for user inputs

* Adds an alert window for deleting a tab

* Rewrites external links to support href in browser & electron

* 🐄

* Fixes deeleting credentials

* Fix uncaught rebase issue

* move elasticsearch to raw API and update tests

* Merge

* minor

* on-prem fixes

* fix url

* Adds fun tables() to /connections/elasticsearch.js

* Elasticsearch index and docs dropdown

* Irons out elasticsearch previews

* Changed all files' format: JSON -> YAML

* include "Unauthenticated" in the error message

* return 200 so that we can return json

* fix elasticsearch tests

* Putting back https part 1

* update elasticsearch

* replace `selectedIndex` with `index`, `selectedType` with `type`

* 🔧 replace `refreshRate` with `refreshInterval`

* 🔧 set refreshInterval as seconds not milliseconds

* update rate to interval error message

* Remove dead code

* Change default port from 9494 to 9000

* Ignore log files

* Putting back https part 2

* Index 0 -> R.head

* putting back https part 3

* putting back https part 4

* finish cleaning dead code

* fix and test oauth2 endpoint

* add watchers

* remove .only from tests

* sanity test home page route

* Improve OAuth interface

* note about error messages

* another TODO

* note about yaml

* prefix ENV variables with `PLOTLY_CONNECTOR`

* ⚡️

* Replace "credential" with "connection"

* Revert "Replace "credential" with "connection""

This reverts commit 7c1e6fc.

* Replace `credential` with `connection`

* ignore generated stylesheet

* 🙈 Except that `credentials` can sometimes be singular...

Replace a bunch of instances of `credentials` with `connection` since
we were previously referring to `credentials` as a single object with a
few parameters. This is now just a `connection`.
Also, we were using `Connections.js` to refer to the different
Datastore backends. Rename this to a Datastore.js module.

* Another credentials -> connections file rename

* protect the `electron` import - can't use `import require` in browser targets

* ⚡️ dead code

* remove some `console.log`s

* `getCerts` is breaking non-electron builds for some reason

comment it out for now

* comment about cert file locations

* remove elasticsearch `index` from test fixtures

* Perform a pre-query authentication check

* Fix deleting queries

* Fix the format of tables

should be `[‘table 1’, ‘table 2’]` not `[[‘table 1’], [‘table 2’]]`

* Update names of backend routes

mostly for all actions to fall under `/connections`

* Fix an `electron` import to work in node environments and tests

* remove nrows and ncols

* fix and update `routes.spec.js` tests. all 29 are passing now

* add unit testing npm command

usage:
```
$ npm run test-unit test/backend/persistent/routes.spec.js --watch
```

* update front-end with new endpoints

* include the dialect in the connection ID

other contexts like shareplot will only have the connectionID, they
won’t have the dialect. storing the dialect as part of the connectionID
will allow those contexts to render dialect-specific UIs without making
an additional request to the connector

* Remap heroku's $PORT to our $PLOTLY_CONNECTOR_PORT on heroku build

* set heroku's port in the procfile

* Fix more tests. 47/50 are passing now.

* 🐨 Edit credentials button

* 🛀 and update todo.md

* move https to front end

* fix dynamic import

* 3 SQL fixes

- Redshift tables
- SQLite connect
- Tables across all dialects

* Rename `Connections` to `Datastores` in routes

* Check that connections are valid before saving them

* Remove `ncols`, `nrows`

* 📖

* ⚡️

* Add tests for new "connect before save" behaviour and test every dialect

* 🍤 lock in dependencies with shrinkwrap

* ⚡️

* new access token

gotta figure out why these are expiring

* Attempt to fix linux build error

Builds on heroku were failing due to:

This thread: npm/npm#14042 recommended
switching to `3.10.10` and adding `fsevents: ‘*’` in optional deps.

Got to switch to Yarn soon!

* attempt downgrading npm to fix heroku shrinkwrap build issue

* Try removing postinstall

* rm shrinkwrap until yarn - too many cross-platform errors

* improve refreshInterval error message

* bump version of npm

as recommended here: github.com/npm/npm/releases

* We can't use `fs` in the web-app front end

comment out `https` so that it works in the web browser for now

* comment out httpsUtils since it doesn't work in non-electron envs

* try to get shrinkwrap working again

* finally fix https

* 🛀 and fix web-build

* 🐨 edit credentials part 1

* 🔧 split error in the web build for __filename

* Change `PLOTLY_API_DOMAIN` to `PLOTLY_API_URL`

* ⚡️

* Docker updates:

- Add support for custom API domains
- Add support for data mapping between host and container
- Add support for shrinkwrap
- Log to stdout

* typo

* TODO about file location and logs

* Didn't mean to commit this

* ⭐️ edit credentials

* 🐯 for `PUT credentials/:id`

* 🐨 for section titles

* ⚡️  console warns and some other 🛀

* update TODO

* 🔧 weird state occurence when updating crews

* Another `CREDENTIALS` -> `CONNECTIONS` change

* Make the storage folder configurable

Also fix a few tests

* update a few comments

* add todos about untested endpoints

* Include sample connections in the repo so that heroku can use them

* remove generated style folder

* Include the storage path env variable in the Procfile

This allows the heroku instance to read the settings from the example
databases included in this repo in the `sample-storage` folder

* Include an empty logfile to write to

* heroku directory is `app` not `web`

* nice big favicons

* rm sample log file

* fix typo in connections and add postgres

* move sqlite into the group of sql-like connections

* update-credentials: add tests and validate

* 🔧 the hack in tests to start an http server

* update credentials: UX/UI fixes

* Support non-owners updating queries

* update expected results from elasticsearch test database

* 🙈 typo

* include domain as runtime env variable instead of build-time env variable

* fix error handling

* remove blank settings

* ⭐️ scrolling

* do not package certs into the release

* 🙈 requestor

* use a 200K rows database for scroll tests

* make the SSL option clearer

* 🙈 was calling `clearInterval` on the value, not the key

* this is not an error - it can happen on regular usage

* clean up logs

* fixup 404 behaviour

* fix elasticsearch tests with the new elasticsearch data

* fix tests

* fix more tests

* fix more tests

* Wait no - I had it right. And now I have the tests to prove it.

* update comment

* handle quotes and comma escapes in CSV parsing

* Even if the owner is the requestor, check that they have write permissions

* Update error message for front end

* fix tests

* Keep consistent order of columns in elasticsearch queries

* Update tests with new column order

* use a new index to test scroll that has linear values

and update tests so that we’re testing the actual values, not just the
lengths

* remove .only

* A new Apache Drill test instance with more memory

* support elasticsearch `geo_point`

* fix tests with new remote datastore configs

* apache drill error messages and tests

* 🐨 fixes for options

* ignore all of those log files

* external button links to workspace (onprem or normal)

* 🐨 for https step when setup

* 🐨 fix for buttons style to match

* options checkbox bad position

* 🛀 cleanup TODO.md and Configuration.react.js

* fixes domain error

* use relative URLs for static content

* Fix dockerfile comment (thanks @scjody !)

* change some copy to test

* Remove test element

* don't log to file if we're only logging to `stdout`

* typo 🙈

* oauth URL fixes

* display dev tools even in production

otherwise it’s really hard to help our users debug what might be going
wrong

* fix dockerfile mapping

* bump version to 1.0.0

* `build-web` when building the package too

at the least for oauth!

* rm elasticsearch from package

lots of other unused packages in here too

* try adding `csv-parse` to the external list to get builds to work

* update which ways the arrows point to indicate expanded or collapsed

`>` commonly represents collapsed, and the down one usually represents
collapsed.

* remove upgrade button from on-prem

* change CTA to plans

* fixes workspace button

* swap e2e tests with unit tests on circle

* linux is case sensitive

* fix some tests

* lint

* Fix error message

* 🙈 typo

* make tests less fragile

* `mkdirp.sync`

* rm lint from tests for now and define concat

* increase the timeouts for circle

* 🙈 `this`

* fix https section for windows

* fix oauth2 urls for on-prem

* semver our api

* show error handling when connect aborts after save error

* 🙈

* cleanup todos and dead code

* fixes elasticsearch previews

* comments on handling saving errors

* table cell can be a dict

* missed a couple of conflicts
32582b3
@chriddyp chriddyp referenced this issue in plotly/plotly-database-connector Dec 8, 2016
Merged

Unify npm and node versions across environments #117

@kvz kvz added a commit to kvz/bash3boilerplate that referenced this issue Dec 15, 2016
@kvz kvz Fix Travis error
Unsupported platform for fsevents@1.0.15: wanted
{"os":"darwin","arch":"any"}

Unsupported platform for fsevents@1.0.15: wanted
{"os":"darwin","arch":"any"}

https://travis-ci.org/kvz/bash3boilerplate/jobs/184200578#L757

npm/npm#14042
15b1092
@bbonamin bbonamin added a commit to bbonamin/react_on_rails that referenced this issue Dec 20, 2016
@bbonamin bbonamin Attempt to lock npm version on TravisCI
To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
137d186
@bbonamin bbonamin added a commit to bbonamin/react_on_rails that referenced this issue Dec 23, 2016
@bbonamin bbonamin Lock npm version on TravisCI
To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
12053d9
@bbonamin bbonamin added a commit to bbonamin/react_on_rails that referenced this issue Dec 23, 2016
@bbonamin bbonamin Lock npm version on TravisCI
To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
7edc2d0
@bbonamin bbonamin added a commit to bbonamin/react_on_rails that referenced this issue Dec 25, 2016
@bbonamin bbonamin Lock npm version on TravisCI
To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
ab689f0
@bbonamin bbonamin added a commit to bbonamin/react_on_rails that referenced this issue Dec 26, 2016
@bbonamin bbonamin Lock npm version on TravisCI
To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
39e791e
@bbonamin bbonamin added a commit to bbonamin/react_on_rails that referenced this issue Dec 26, 2016
@bbonamin bbonamin Lock npm version on TravisCI
To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
d1c7cbb
@justin808 justin808 added a commit to shakacode/react_on_rails that referenced this issue Dec 26, 2016
@bbonamin @justin808 bbonamin + justin808 Compatibility with Ruby 2.0+ (#651)
* Add more Ruby versions < 2.3 to TravisCI
* Modify keyword arguments for Ruby 2.0 compat
Required keyword arguments were introduced in Ruby 2.1, but can be emulated in 2.0 by using a default value that raises an ArgumentError
* Remove web-console
    It's not compatible with Ruby < 2.2
* Lock npm version on TravisCI
   To work around the issue npm/npm#14042,
where npm tries to install optional dependencies and fails.
* Add required_ruby_version to gemspec
   So that rubygems.org can pick it up and display it on the gem page.
eb54c08
@contolini contolini added a commit to cfpb/cfgov-refresh that referenced this issue Jan 31, 2017
@contolini contolini Have Travis downgrade npm due to npm/npm#14042 4fb96be
@lauraGgit lauraGgit added a commit to 18F/fedramp-dashboard that referenced this issue Feb 1, 2017
@lauraGgit lauraGgit get rid of npm-shrinkwrap
To try to avoid the npm install issues on travis: npm/npm#14042
68c39bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment