Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Couldn't install optional dependency: Unsupported #9204

Closed
StreetStrider opened this issue Aug 8, 2015 · 157 comments
Closed

Couldn't install optional dependency: Unsupported #9204

StreetStrider opened this issue Aug 8, 2015 · 157 comments

Comments

@StreetStrider
Copy link

Hello. I've faced some issues, possibly it was caused by updating npm from v2 to v3 on my machine. I've tried to solve this by myself but had no success.

I'm using my homedir as a place for common-used npm-packages.
So, when I do npm i fibonacci in ~ I get ~/node_modules/fibonacci. This works even if I have no ~/package.json (I recieve warning, but this is ok for me). I was using this for tests: any node script in my home subtree is able to access modules from ~/node_modules. I also have my own packages in ~/node_modules as git-repositories, synchronized with my github repos. This works in v2, but in v3 I got this error on every install:

npm WARN install Couldn't install optional dependency: Unsupported
npm WARN ENOENT ENOENT, open '/home/streetstrider/package.json'
npm ERR! Linux 3.13.0-61-generic
npm ERR! argv "node" "/home/streetstrider/opt/node/bin/npm" "i" "lodash"
npm ERR! node v0.12.7
npm ERR! npm  v3.2.1
npm ERR! path /home/streetstrider/node_modules/repl.js
npm ERR! code EISGIT

npm ERR! git Appears to be a git repo or submodule.
npm ERR! git     /home/streetstrider/node_modules/repl.js
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

Here I'm trying to install lodash; and repl.js is my own package, installed as git-repo. So, when I have any git repositories in ~/node_modules they prevent me from installing any other ordinary package.

How I'm trying to fix this:

  1. I've searched through my packages tree and found nothing broken.
  2. I've also searched for «Unsupported»-stuff in tree, nothing too.
  3. Then I hide all my git repositories and install proceeded successfully.
  4. Then I unhide one of my git-packages and error shows again.
  5. I've searched through issues here and found nothing similar. Maybe npm@3: global install fails with EISGIT if npm link has been used to make WIP modules globally available #7790 has some similarities, though.
    Please, help me to overcome this issue.
@othiym23 othiym23 added this to the 3.x milestone Aug 10, 2015
@StreetStrider
Copy link
Author

I'm switching to npm@2 for now, since this issue bothers me too much. I also have npm's edge installed beside, so if fix arrives I can help to reproduce & check it.

@trusktr
Copy link

trusktr commented Aug 30, 2015

I also have some "Unsupported" option dependency error:

npm WARN install Couldn't install optional dependency: Unsupported

What does it mean?

@cchamberlain
Copy link

Same here.

image

@OnkelTem
Copy link

Same here.
Doing like:

npm install moment --save

and then getting:

npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported

My package.json:

{
  "name": "Sodruzhestvo",
  "version": "2.0.0",
  "browser": {},
  "browserify": {
    "transform": [
      "envify",
      "brfs"
    ]
  },
  "devDependencies": {
    "brfs": "",
    "browser-sync": "",
    "browserify": "",
    "envify": "",
    "exorcist": "",
    "gulp": "",
    "gulp-autoprefixer": "",
    "gulp-changed": "",
    "gulp-concat": "",
    "gulp-data": "",
    "gulp-debug": "",
    "gulp-if": "",
    "gulp-imagemin": "",
    "gulp-jade": "",
    "gulp-minify-css": "",
    "gulp-minify-html": "",
    "gulp-notify": "",
    "gulp-rename": "",
    "gulp-sass": "",
    "gulp-sourcemaps": "",
    "gulp-streamify": "",
    "gulp-ng-html2js": "",
    "gulp-tap": "",
    "gulp-uglify": "",
    "gulp-util": "",
    "gulp-cat": "",
    "pretty-hrtime": "",
    "js-yaml": "",
    "merge-stream": "",
    "require-dir": "",
    "vinyl-source-stream": "",
    "watchify": "",
    "yargs": ""
  },
  "dependencies": {
    "moment": "^2.10.6"
  }
}

@davidmyersdev
Copy link

What version of NPM are you guys running? I'm having the same issue on version 3.3.3.

@cchamberlain
Copy link

@drmyersii 3.3.4 Windows 10

@GenaANTG
Copy link

same problem, 3.3.3 on Ubuntu

@rubensayshi
Copy link

same problem ubuntu, when testing it seems this also occurs with 3.2, so I'm using npm@3.1 right now

@lukeapage
Copy link

same problem, windows 8 version 3.3.3

@ndaidong
Copy link

Same issue. Linux Mint 17.2, Node.js 4.1.1, npm 3.3.3

P/S: remove entirely node_modules folder and then run "npm install", it works as well.

@Katharsas
Copy link

+1, 3.3.3 on Win7x64, running npm over maven, all my dependencies:

"devDependencies": {
        "fs": "0.0.2",
        "path": "^0.11.14",
        "gulp": "^3.9.0",
        "gulp-babel": "^5.2.1",
        "gulp-sass": "^2.0.4",
        "gulp-watch": "^4.3.5"
    }

@rafaelmagu
Copy link

I think we have enough +1 now to validate this issue. Please use the Subscribe button instead of adding another +1 from now on. 👍

Current workaround is to completely remove the node_modules/ folder and run npm install again.

@StreetStrider
Copy link
Author

@rafaelmagu, which is not a workaround for my case at all.

@rafaelmagu
Copy link

If that doesn't work, reverting to npm@2 should make the problem go away (remember to also remove node_modules/), as highlighted by @StreetStrider.

@binarykitchen
Copy link

workaround does not work for me either - can this be regressed soon? thanks

@migralito
Copy link

I deleted the folder and done npm install again and still whines about it. However it doesn't stop the process so there wouldn't be a need for downgrading to npm@2, would it?

@calcaide
Copy link

calcaide commented Oct 1, 2015

Same problem, Ubuntu 14.04, NPM 3.3.4.
The workaround doesn't work for me.
Thanks

@darkmavis1980
Copy link

I have the same issue on one of my servers (Ubuntu), removing the node_modules doesn't fix the problem

npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
npm ERR! Linux 3.13.0-61-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.0.0
npm ERR! npm  v3.3.5

npm ERR! Cannot read property 'localeCompare' of undefined
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

Everything works fine if I revert back to Npm 2.x.x

@ezeed
Copy link

ezeed commented Oct 7, 2015

Same here, in arch linux and everything works fine too for me only if I revert back to Npm 2.x.x

@thisisole
Copy link

Not fixed in 3.3.5

@LitixThomas
Copy link

Still exists in 3.3.6

npm WARN install Couldn't install optional dependency: Unsupported
npm ERR! Linux 3.8.0-29-generic
npm ERR! argv "node" "/usr/bin/npm" "install"
npm ERR! node v1.2.0
npm ERR! npm  v3.3.6

npm ERR! Cannot read property 'localeCompare' of undefined
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

@iarna
Copy link
Contributor

iarna commented Oct 8, 2015

Folks with localeCompare issues, which seem to be unrelated to the op, please see #9766 (tldr, we're landing the fix for that issue today)

@ghost
Copy link

ghost commented Oct 17, 2015

I have this issue as well with npm 3.3.8 and 3.3.9 on Windows 7 and Windows Server 2012. The "workaround" - deleting node_modules and executing npm install - does not work for me either.

@samir1kumar
Copy link

Hi,
Please help. I am also getting similar issue. I tried alot. It does not work. I am running latest updated ubuntu trusty 32-bit vagrant on windows 7.

vagrant@vagrant-ubuntu-trusty-32:/vagrant/wp/wp-content/themes/comfortmsh$ npm install
npm WARN install Couldn't install optional dependency: Unsupported
sage@8.3.0 /vagrant/wp/wp-content/themes/comfortmsh
└── (empty)

npm ERR! Linux 3.13.0-63-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.8
npm ERR! path ../dev-ip/lib/dev-ip.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../dev-ip/lib/dev-ip.js' -> '/vagrant/wp/wp-content/themes/comfortmsh/node_modules/.bin/dev-ip'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Linux 3.13.0-63-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.8
npm ERR! path npm-debug.log.e2b3c9c7da566e16beb712ab7d63c66f
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename

npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.e2b3c9c7da566e16beb712ab7d63c66f' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /va/vagrant/wp/wp-content/themes/comfortmsh/npm-debug.log
npm ERR! code 1

@samir1kumar
Copy link

Hi ,

I am able to resolve my issue now after using below command:-

$ npm install --no-bin-links

since i had to further install bower, so i used:
$ bower install <------- worked fine.

Then i wanted to build my wordpress sage template. I used 👎
$ gulp <---- further gave some error and pointed me to use "npm rebuild node-sass"

$ npm rebuild node-sass <- gave again some symbolic link error, I choose below command which worked fine.

$ npm rebuild node-sass --no-bin-links

Further i was able to use gulp to build. Thanks.

@othiym23 othiym23 added bug and removed support labels Oct 19, 2015
@cchamberlain
Copy link

@replete - Are you getting an error when running your npm install or just the standard fsevents warning? Can you post a screenshot maybe if its VS specific?

@replete
Copy link

replete commented Oct 7, 2016

VS thinks the npm deps are unmet, so you see the warning in the solution
explorer.

It is always fsevents.

On 7 Oct 2016 01:16, "Cole Chamberlain" notifications@github.com wrote:

@replete https://github.com/replete - Are you getting an error when
running your npm install or just the standard fsevents warning? Can you
post a screenshot maybe if its VS specific?


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

@cchamberlain
Copy link

@replete - If VS is throwing errors due to the fsevents warning, then that's a VS bug.

@replete
Copy link

replete commented Oct 8, 2016

@cchamberlain I believe it is probably npm:

  • Visual Studio 2015 Update 3 currently ships with an internally maintained version of node/npm.
  • The version of npm shipped is 3.3.4 - C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External> ./npm.cmd -v
  • The version of Node.js shipped is v5.4.1 - C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External> ./node.exe -v
  • The console error with Visual Studio (when manual install triggered) is npm WARN install Couldn't install optional dependency: Unsupported - the title of this thread.

Therefore, I believe this error is caused by the version of npm|Node shipped with Visual Studio 2015.3.

I only comment here so that others in my predicament might find a workaround.

@cchamberlain
Copy link

@replete - Thanks for the additional information. Many windows bugs have been targeted between that old version and now, I think it would likely work if you could update the internal version. Until the version is updated to a current version, I would still qualify this a VS bug unless this is happening in the current published npm version. @felixrieseberg maybe knows something of this internally maintained npm?

@replete
Copy link

replete commented Oct 9, 2016

@cchamberlain No worries.

I will wait for the Visual Studio web tools to be updated and continue using my workaround, as manual upgrading of the web tools could cause hard-to-diagnose problems should there be any breaking change between the versions.

@danieltulp
Copy link

danieltulp commented Oct 17, 2016

I to had this problem with Visual Studio 2015 and I found a post describing how to make VS not use its internal Node.js and NPM but your own install

@cchamberlain
Copy link

@Alam1386 - Your issue is unrelated to this optional dependencies issue and does not belong here. On a separate note, why are you trying to install bootstrap into itself?

@lokap
Copy link

lokap commented Oct 20, 2016

I have fixed the issue like this:

Installed the latest version of npm: npm install -g npm@next
Added C:\Users\AppData\Roaming\npm to Windows' PATH. This must be placed before C:\Program Files\nodejs.

@vernak2539
Copy link

vernak2539 commented Nov 21, 2016

Ending up getting the output below.

Running on CentOS 7 x64 (doesn't happen on Mac)
Node v6.5.0
NPM v3.10.3
node-gyp v3.3.1

I have a git+ssh dependency in my package.json, in addition to others

Have tried adding fsevents as an optional dependency, but it has not helped.

I'm not sure where the issue falls, and I've opened one here also

[Step 2/2] > fsevents@1.0.15 install /opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents
[17:28:01][Step 2/2] > node-pre-gyp install --fallback-to-build
[17:28:01][Step 2/2] 
[17:28:02][Step 2/2] node-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.15/fse-v1.0.15-node-v48-linux-x64.tar.gz 
[17:28:02][Step 2/2] node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.15 and node@6.5.0 (node-v48 ABI) (falling back to source compile with node-gyp) 
[17:28:03][Step 2/2] gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
[17:28:03][Step 2/2] gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
[17:28:03][Step 2/2] gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
[17:28:03][Step 2/2] make: Entering directory `/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/build'
[17:28:03][Step 2/2]   SOLINK_MODULE(target) Release/obj.target/.node
[17:28:03][Step 2/2] make: Leaving directory `/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/build'
[17:28:03][Step 2/2] make: g++: Command not found
[17:28:03][Step 2/2] make: *** [Release/obj.target/.node] Error 127
[17:28:03][Step 2/2] gyp ERR! build error 
[17:28:03][Step 2/2] gyp ERR! stack Error: `make` failed with exit code: 2
[17:28:03][Step 2/2] gyp ERR! stack     at ChildProcess.onExit (/opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
[17:28:03][Step 2/2] gyp ERR! stack     at emitTwo (events.js:106:13)
[17:28:03][Step 2/2] gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
[17:28:03][Step 2/2] gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[17:28:03][Step 2/2] gyp ERR! System Linux 3.10.0-327.36.2.el7.x86_64
[17:28:03][Step 2/2] gyp ERR! command "/opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/bin/node" "/opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/lib/binding/Release/node-v48-linux-x64/fse.node" "--module_name=fse" "--module_path=/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/lib/binding/Release/node-v48-linux-x64"
[17:28:03][Step 2/2] gyp ERR! cwd /opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents
[17:28:03][Step 2/2] gyp ERR! node -v v6.5.0
[17:28:03][Step 2/2] gyp ERR! node-gyp -v v3.3.1
[17:28:03][Step 2/2] gyp ERR! not ok 
[17:28:03][Step 2/2] node-pre-gyp ERR! build error 
[17:28:03][Step 2/2] node-pre-gyp ERR! stack Error: Failed to execute '/opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/bin/node /opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/lib/binding/Release/node-v48-linux-x64/fse.node --module_name=fse --module_path=/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/lib/binding/Release/node-v48-linux-x64' (1)
[17:28:03][Step 2/2] node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
[17:28:03][Step 2/2] node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
[17:28:03][Step 2/2] node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
[17:28:03][Step 2/2] node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
[17:28:03][Step 2/2] node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
[17:28:03][Step 2/2] node-pre-gyp ERR! System Linux 3.10.0-327.36.2.el7.x86_64
[17:28:03][Step 2/2] node-pre-gyp ERR! command "/opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/bin/node" "/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
[17:28:03][Step 2/2] node-pre-gyp ERR! cwd /opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents
[17:28:03][Step 2/2] node-pre-gyp ERR! node -v v6.5.0
[17:28:03][Step 2/2] node-pre-gyp ERR! node-pre-gyp -v v0.6.29
[17:28:03][Step 2/2] node-pre-gyp ERR! not ok 
[17:28:03][Step 2/2] Failed to execute '/opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/bin/node /opt/teamcity_1/system/jonnyzzz.nvm/v6.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/lib/binding/Release/node-v48-linux-x64/fse.node --module_name=fse --module_path=/opt/teamcity_1/work/867b3a477a07a47e/node_modules/fsevents/lib/binding/Release/node-v48-linux-x64' (1)
[17:28:03][Step 2/2] npm WARN install:fsevents@1.0.15 fsevents@1.0.15 install: `node-pre-gyp install --fallback-to-build`
[17:28:03][Step 2/2] npm WARN install:fsevents@1.0.15 Exit status 1

@greyvugrin
Copy link

greyvugrin commented Dec 21, 2016

@replete Take a look at #14042 (comment), solved the issue for me in a different case. Same core problem though - fsevents was getting installed regardless of being optional.

Key addendum though: the comment talks about downgrading to 3.10.7, but 3.10.10 and up fix the issue.

Adding

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

and running npm install --no-optional did the trick for me

@Anbuphonegap
Copy link

While install ionic using below command:

npm install ionic -g
below error throws:
npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-a
pp-lib@2.1.9

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\io
nic\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32
"})
npm WARN In ionic@2.1.18 replacing bundled version of cross-spawn with cross-spa
wn@4.0.2
npm WARN In ionic@2.1.18 replacing bundled version of semver with semver@4.2.0
npm WARN In ionic@2.1.18 replacing bundled version of mime-types with mime-types
@2.0.14
npm WARN In ionic@2.1.18 replacing bundled version of form-data with form-data@0
.2.0
npm WARN In ionic@2.1.18 replacing bundled version of request with request@2.51.
0
npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-a
pp-lib@2.1.9

any body help to resolve this issue

Thanks
Anbu

@caneraydinbey
Copy link

still

npm WARN lifecycle gateway@0.0.0~postinstall: cannot run in wd %s %s (wd=%s) gateway@0.0.0 webdriver-manager update /home/vegan/xx-yy/gateway npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17

@Faithree
Copy link

Faithree commented Feb 11, 2017

npm install //why? npm-v 3.10.8 && 3.10.9&& 4.2

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

用git bash就会出现这种警告,并且退出 用cmd就可以好好使用

@mInzamamMalik
Copy link


admin-pc@admin:/media/admin-pc/projects/Projects/my client/ariel_project (copy).git$ npm i
npm WARN optional Skipping failed optional dependency /react-scripts/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.1

latest ubuntu
latest node and npm
this is a react cli project
not detecting file changes

@legodude17
Copy link
Contributor

@malikasinger1 That is not an error, that is just letting yoy know that fsevents isn't meant for you OS.

@Foxhoundn
Copy link

Foxhoundn commented Jun 7, 2017

Without any changes this has started happening -

npm ERR! Linux 3.10.0-514.21.1.el7.x86_64
npm ERR! argv "/var/lib/jenkins/.nvm/versions/node/v4.4.2/bin/node" "/var/lib/jenkins/.nvm/versions/node/v4.4.2/bin/npm" "i"
npm ERR! node v4.4.2
npm ERR! npm  v3.10.10
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for fsevents@1.0.11: 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

Please note that this is actually an ERR not a warning and breaks our builds..

I tried adding the --no-optional flag but that didn't help.

@legodude17
Copy link
Contributor

legodude17 commented Jun 7, 2017

Try running npm ls --only=prod fsevents and then change those deps to optional. Also update npm to the latest version.

@karlfus
Copy link

karlfus commented Jun 13, 2017

I'm seeing the same problem as Foxhoundn above: this is now an ERR.

I've tried this with the new npm, both LTS and current (3.10.8).

npm ls --only=prod fsevents just returns `-- (empty)

NOTE: I fixed this problem temporarily by removing fsevents from our npm-shrinkwrap.json file. But the dependency in there is clearly marked as optional (and dev):

"fsevents": {
"version": "1.1.1",
"from": "fsevents@>=1.0.0 <2.0.0",
"dev": true,
"optional": true,
...

@kul1010
Copy link

kul1010 commented Jun 23, 2017

[pankaj.kulshrestha@www-test-01 SimpleWebRTC]$ sudo npm install

git-validate@2.2.2 install /var/www/html/pankaj/nodejs_proj/SimpleWebRTC/node_modules/git-validate
node bin/install

fs.js:641
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^

Error: EACCES: permission denied, open '/var/www/html/pankaj/nodejs_proj/SimpleWebRTC/.git/hooks/pre-commit'
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.writeFileSync (fs.js:1347:33)
at Object.exports.installHooks (/var/www/html/pankaj/nodejs_proj/SimpleWebRTC/node_modules/git-validate/lib/utils.js:248:12)
at Object. (/var/www/html/pankaj/nodejs_proj/SimpleWebRTC/node_modules/git-validate/bin/install.js:3:7)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! Linux 3.10.0-514.21.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! git-validate@2.2.2 install: node bin/install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git-validate@2.2.2 install script 'node bin/install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the git-validate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node bin/install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs git-validate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls git-validate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/pankaj/nodejs_proj/SimpleWebRTC/npm-debug.log

@zazaian
Copy link

zazaian commented Jul 9, 2017

I can confirm that using the npm install --no-optional flag works for me on Ubuntu 16.04 with Node 5.1.0. It's kind of annoying, but it seems less hacky than generating an empty file for non-OSX machines.

I did NOT have to use this patch from @greyvugrin to get it working:

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

@LastTribunal
Copy link

LastTribunal commented Aug 3, 2017

npm uninstall fsevents
This will remove the retarded mac dependency

@cchamberlain
Copy link

Under most cases you shouldn't need to physically add fsevents to optionalDependencies. It's trying to install it because some of your packages take an optional dependency on it.

Using CLI option --no-optional means don't install any direct or transitive optional dependencies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests