fsevents: Node 10: Lots of warnings and errors upon install

Getting a bunch of warnings and errors when installing my dependencies with node 10.

Possibly related to:

https://github.com/nodejs/node-gyp/issues/942 https://github.com/kelektiv/node.bcrypt.js/issues/634

Node: 10.5.0 NPM: 6.1.0 / 6.2.0 NVM: 0.33.1 / 0.33.11

npm list fsevents:

project@x.x.x /Users/user/code/project
├─┬ budo@11.3.2
│ └─┬ chokidar@1.7.0
│   └── fsevents@1.2.4
├─┬ jest@22.4.2
│ └─┬ jest-cli@22.4.4
│   └─┬ jest-haste-map@22.4.3
│     └─┬ sane@2.5.2
│       └── fsevents@1.2.4  deduped
├─┬ react-scripts-ts@2.8.0
│ └── UNMET OPTIONAL DEPENDENCY fsevents@1.1.2
├─┬ react-styleguidist@6.0.33
│ └─┬ webpack-dev-server@2.11.2
│   └─┬ chokidar@2.0.4
│     └── fsevents@1.2.4  deduped
└─┬ webpack@3.7.1
  └─┬ watchpack@1.6.0
    └─┬ chokidar@2.0.4
      └── fsevents@1.2.4  deduped

Errors during npm install:

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.2 and node@10.5.0 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.2 and node@10.5.0 (node-v64 ABI) (falling back to source compile with node-gyp)
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from In file included from ../fsevents.cc:85:
../fsevents.cc:85:
../src/methods.cc:14../src/methods.cc::1214::12 : warningwarning: : 'Call' is deprecated [-Wdeprecated-declarations]
  handler->Call(3, argv);
           ^
'Call' is deprecated [-Wdeprecated-declarations]
  handler->Call(3, argv);
           ^
../../../../nan/nan.h:1617:3:../../../../nan/nan.h :1617:note3: : 'Call' hasnote : been 'Call'explicitly  hasmarked  beendeprecated  explicitlyhere marked
 deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>  NAN_DEPRECATED inline v8::Local<v8::Value>

  ^  ^

../../../../nan/nan.h../../../../nan/nan.h::9898::4040::  notenote: : expandedexpanded  fromfrom  macromacro  'NAN_DEPRECATED''NAN_DEPRECATED'

# define NAN_DEPRECATED __attribute__((deprecated))# define NAN_DEPRECATED __attribute__((deprecated))

                                       ^                                       ^

1 warning generated.
1 warning generated.
rm: ./Release/.deps/Release/obj.target/fse/fsevents.o.d.raw: No such file or directory
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/user/.nvm/versions/node/v10.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.6.0
  SOLINK_MODULE(target) Release/fse.node
gyp ERR! command "/Users/user/.nvm/versions/node/v10.5.0/bin/node" "/Users/user/.nvm/versions/node/v10.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/user/.nvm/versions/node/v10.5.0/bin/node /Users/user/.nvm/versions/node/v10.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.6.0
node-pre-gyp ERR! command "/Users/user/.nvm/versions/node/v10.5.0/bin/node" "/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents
node-pre-gyp ERR! node -v v10.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/Users/user/.nvm/versions/node/v10.5.0/bin/node /Users/user/.nvm/versions/node/v10.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
  COPY /Users/user/code/project/node_modules/react-scripts-ts/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 61
  • Comments: 22 (4 by maintainers)

Most upvoted comments

In my case the errors were only caused by fsevents 1.1.2 which was a sub dependency of react-scripts-ts. After upgrading react-scripts-ts which requires fsevents 1.2.4 (the same as my other dependencies), all my errors and warnings went away.

I’d recommend anyone else running into this issue run npm ls fsevents to list which of their dependencies depend on fsevents, and from here you should be able to upgrade these dependencies (or open pull requests against those modules if they’re still using an older version).

fixed by using older node version (LTS): nvm install 8.11.3 nvm use 8.11.3 and installing node-gyp globally: npm install -g node-gyp

Thanks for the tip about the version number, @JakeSidSmith! Because we use yarn in our project, we were able to solve this without explicitly upgrading any dependencies: We used yarn why

yarn why v1.9.4
[1/4] 🤔  Why do we have the module "fsevents"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "fsevents@1.1.3"
info Has been hoisted to "fsevents"
info Reasons this module exists
   - Hoisted from "webpack#watchpack#chokidar#fsevents"
   - Hoisted from "@storybook#react#webpack#watchpack#chokidar#fsevents"
   - Hoisted from "@storybook#react#@storybook#core#webpack#watchpack#chokidar#fsevents"
info Disk size without dependencies: "5.5GB"
info Disk size with unique dependencies: "6.94GB"
info Disk size with transitive dependencies: "12.11GB"
info Number of shared dependencies: 79
=> Found "sane#fsevents@1.1.2"
info This module exists because "jest#jest-cli#jest-haste-map#sane" depends on it.
info Disk size without dependencies: "5.48GB"
info Disk size with unique dependencies: "6.92GB"
info Disk size with transitive dependencies: "12.09GB"
info Number of shared dependencies: 79

… and updated the resolutions in our package.json:

{
  "resolutions": {
    "jest/jest-cli/jest-haste-map/sane": "1.2.4",
    "webpack/watchpack/chokidar/fsevents": "1.2.4"
  }
}

@Vages Thanks for the tip! Although I had to add /fsevents to the first resolution:

{
  "resolutions": {
    "jest/jest-cli/jest-haste-map/sane/fsevents": "1.2.4",
    "webpack/watchpack/chokidar/fsevents": "1.2.4"
  }
}

You should never install using sudo. You’re creating potential security holes doing that.

But if I understand you correctly, when just installing without sudo everything is fine?

Hehe, yeah. I’d be comfortable doing that in a hobby project, but after some experiments in my early days of using yarn, I no longer feel comfortable manually editing yarn.lock (or going against the documentation in other ways) in code that I deliver to a client – lest some dependency starts behaving in unforeseen ways. I’m sure a better or more daring programmer than I would be able to do this and sleep at night. 🙂

Same issue. Same Node version (10.7.0). On Mac High Sierra.

I seem to have fixed this by uninstalling and reinstalling npm.

I used the “More Severe Uninstalling” section of this guide.

https://docs.npmjs.com/misc/removing-npm

@pipobscure it is not an issue in 1.2.4 (and possibly higher).

xcode->product->clean

Hi, your problem is entirely different.

Here are things to try:

  1. Have a look if you can update to 2.x (chokidar 3.x)
  2. If you can’t then at least make sure your package.json ‘s allow the newest version of the 1.2.x branh
  3. Make sure you are actually getting the newest version and that your package-lock.json isn’t pinning you to an older version (hint: do this one twice, you might get results)
  4. If you still have no joy then open a new issue. This one is closed and has such a generic title that it can pretty much match any description for an installation problem.

You can install the newest version of either v1.2.x or 2.x you just have to make sure you actually get the newest one.

If you are working with a new node version/release (such as you are with 12.4.0) there will never be prebuilt binaries. So you’ll have to then wait at least 1 month until the people maintaining this package have had a chance to release new binaries for v1.2.x.

for v2.x new binaries are never needed. So if you can update, that will eliminate your problem.

Glad you are checking in. It’s a good sign that you are accountable and proactive.

LoL @byusyephen I’m the author and was just trying to make sure you figured it out and there wasn’t an actual current issue that i’d need to fix😀

After setting the proper owner for the directory it worked fine for me. But that was my issue relating to fsevents . Yet from all my research people have had luck with either using nvm and downgrading back to NPM 8, or by running npm install --no-optional, or setting the proper directory owner:group on the directory.

Honestly, I don’t know what will fix it for you, but the above list gives you some options to try.

I found out that the node_modules directory was installed as a different user and group on my Mac. I just ran a CHOWN command to make it match the rest of the files in my directory:

sudo chown myusername:mygroupname node_modules/

And the rest of the install worked like a charm. Actually, it errored out again when running as sudo, but running it WITHOUT sudo worked great. Also, you can always try running the --no-optional flag when running node install, but that still didn’t work for me.

(for the record, I got the issue when it came to install fsevents but it is likely that the cause for each failure are very similar).