Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node: 12.2.0 throws error during npm install #278

Closed
prakash-chokalingam opened this issue May 14, 2019 · 34 comments
Closed

Node: 12.2.0 throws error during npm install #278

prakash-chokalingam opened this issue May 14, 2019 · 34 comments

Comments

@prakash-chokalingam
Copy link

prakash-chokalingam commented May 14, 2019

Use Node: 12.2.0
Command: npm install

Sorry for long error logs

The following issue occurs,

@bnoordhuis
Copy link
Contributor

Install fsevents@1.2.9 and it should work.

@JhinDeng
Copy link

Install fsevents@1.2.9 and it should work.

it works for node 10.15.3

@sulkaharo
Copy link

sulkaharo commented May 16, 2019

Anyone hitting issues with 1.2.9, remember to make sure you've updated node-sass (npm install node-sass) to latest version that has full support for Node 12

@pipobscure
Copy link
Contributor

This is fixed with fsevents@1.2.9 for the v1.x branch.

@reneklacan
Copy link

reneklacan commented May 18, 2019

1.2.9 seems to be still broken on node 12.1.0 :(

@pipobscure
Copy link
Contributor

Looking at that log, it’s clearly 1.2.4 and NOT 1.2.9

I assume there is something in a lockfile that prevents getting 1.2.9

@reneklacan
Copy link

@pipobscure You are right, my bad, I should have used -E

@iamlockelightning
Copy link

Check your package-lock.json, it may contain dependency that requires fsevents at a low level like 1.1.0, which bothered me the whole day.
Just delete the package-lock.json and install fsevents@1.2.9 and npm install. No error comes!

@nassif7
Copy link

nassif7 commented Jul 10, 2019

the fsevents version you are trying to use is too old, check the dependencies that using it and make sure they are up to date, i had the same issue with create-react-app i could solve it by using a newer version of react-script which is using a newer version of fsevents and it worked for me

@sesm
Copy link

sesm commented Sep 28, 2019

I'm using version fsevents@1.2.9 and still get a build error.

Build log

yarn install v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > dagre-d3-renderer@0.5.8" has incorrect peer dependency "d3@^4.13.0".
warning " > css-to-string-loader@0.1.3" has incorrect peer dependency "css-loader@>=0.25.0 <1.0.0".
[4/4] 🔨  Building fresh packages...
[8/10] ⠁ puppeteer
[-/10] ⠁ waiting...
[3/10] ⠁ puppeteer
[9/10] ⠁ node-sass
warning Error running install script for optional dependency: "/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.10.0
node-pre-gyp info using node@12.11.0 | darwin | x64
node-pre-gyp info check checked for \"/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@12.11.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.11.0 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.11.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/Users/sergey/Repos/mermaid/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sergey/Repos/mermaid/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sergey/.node-gyp/12.11.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/sergey/.node-gyp/12.11.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/sergey/Repos/mermaid/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/sergey/.node-gyp/12.11.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.11.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \\\n           ^
<scratch space>:208:1: note: expanded from here
ToBoolean
^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:2567:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATED(\"ToBoolean can never throw. Use Local version.\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \\\n              ^
<scratch space>:215:1: note: expanded from here
BooleanValue
^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:2605:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED(\"BooleanValue can never throw. Use Isolate version.\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:5426:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2706:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2706:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
    static void Initialize(v8::Handle<v8::Object> exports);
                           ~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder]
   : async_resource(\"fsevents:FSEvents\"), lockStarted(false) {
     ^
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagNone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagNone));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:90:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMustScanSubDirs\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:91:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUserDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:92:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagKernelDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagKernelDropped));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:93:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagEventIdsWrapped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagEventIdsWrapped));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:94:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagHistoryDone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagHistoryDone));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:95:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagRootChanged\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagRootChanged));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:96:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMount));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:97:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUnmount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUnmount));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:98:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemCreated\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemCreated));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:99:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRemoved\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRemoved));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:100:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemInodeMetaMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemInodeMetaMod));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:101:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRenamed\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRenamed));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:102:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemModified\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemModified));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:103:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemFinderInfoMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemFinderInfoMod));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:104:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemChangeOwner\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemChangeOwner));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:105:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemXattrMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemXattrMod));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:106:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsFile\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsFile));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:107:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsDir\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsDir));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:108:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsSymlink\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsSymlink));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../fsevents.cc:85:16: error: variable has incomplete type 'void'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
               ^
../fsevents.cc:85:31: error: no member named 'Handle' in namespace 'v8'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                          ~~~~^
../fsevents.cc:85:48: error: expected '(' for function-style cast or type construction
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                     ~~~~~~~~~~^
../fsevents.cc:85:50: error: use of undeclared identifier 'exports'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                                 ^
../fsevents.cc:85:58: error: expected ';' after top level declarator
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                                         ^
                                                         ;
23 warnings and 11 errors generated.
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/sergey/Repos/mermaid/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command \"/usr/local/bin/node\" \"/Users/sergey/Repos/mermaid/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=5\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v12.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /Users/sergey/Repos/mermaid/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command \"/usr/local/bin/node\" \"/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents
node-pre-gyp ERR! node -v v12.11.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
✨  Done in 204.68s.

@vladanyes
Copy link

Deleting package-lock.json and npm i worked for me.

@Webbrother
Copy link

I've tried all of the mentioned actions. It doesn't work.
I have the same issue. Loooooooong log of errors.

@paulmillr
Copy link
Member

@Webbrother fsevents version?

@Webbrother
Copy link

@paulmillr As I said before I've tried everything. I've tried to install fsevents@1.2.9. I've tried to delete package-lock.json. Doesn't work.

@paulmillr
Copy link
Member

As i've said: what is your fsevents version from package-lock.json? version 1 is unsupported. You need to always use v2. If you have v1 somewhere that'll cause the issue.

@Webbrother
Copy link

Webbrother commented Oct 31, 2019

@paulmillr I tried to install the latest version of fsevents, but it also didn't solve the problem.
What should I do?

  1. rm -rf node_modules
  2. npm i -D fsevents
  3. npm i

Is it correct list of commands?

UPD
I've double checked package-lock.json file, and I see that there are a lot of dependencies that use different versions of fsevents.
What should I do?

@paulmillr
Copy link
Member

you should update these dependencies; if this doesn't help you should tell dependency maintainers to update chokidar or fsevents to latest versions.

@suraneti
Copy link

suraneti commented Nov 4, 2019

I'm facing this issue after I remove yarn.lock and reinstalling the problem seems to be solved.

Environment:
macOS: Mojave 10.14.6
React: ^16.11.0
Node: 12.9.1

yarn.lock
fsevents: 1.2.7

@paulmillr
Copy link
Member

@suraneti read my comments

@warent
Copy link

warent commented Jan 10, 2020

Like @nassif7 said, the issue for me was react-scripts was out of date, using an old version of fsevents that I think was breaking on Node.js 13. Updating to react-scripts@3.3.0 resolved this for me.

More generally speaking, if you're not using react-scripts then find which package(s) you have that depend on fsevents and try updating them.

@jashmenn
Copy link

For those using yarn, I added the following to my package.json and it worked perfectly:

  "resolutions": {
    "fsevents": "1.2.9",
    "**/fsevents": "1.2.9"
  }

@mattbodman
Copy link

mattbodman commented Feb 6, 2020

Had this with Angular-CLI.. Removing package-lock.json fixed it.

@SmileJayden
Copy link

SmileJayden commented Feb 22, 2020

For those using yarn, I added the following to my package.json and it worked perfectly:

  "resolutions": {
    "fsevents": "1.2.9",
    "**/fsevents": "1.2.9"
  }

I use yarn instead of npm.
You really saved my time! Very Thx 👍

@sreuter
Copy link

sreuter commented Mar 27, 2020

Be aware that adding the resolutions workaround to your package.json will fix things on your Mac, but break things in your Linux builds.

yarnpkg/yarn#7590

Seems like best thing is to chase up your dependencies and create PRs for those using older versions of fsevents.

@csmadhav
Copy link

I found out that I was using outdated version of react-scripts I installed the latest one using npm i react-scripts@latest and it worked like a charm

natematykiewicz added a commit to natematykiewicz/rubyapi that referenced this issue Apr 21, 2020
fsevents/fsevents#278

fsevents 1.2.9+ is required for proper macOS Catalina support.
Without that, a yarn install fails. We had 1.2.7 installed.

Yarn doesn't offer a good way to update a subdependency.

yarnpkg/yarn#4986 (comment)

This comment suggests deleting the package you want to upgrade from
the yarn.lock file and running `yarn install`. So, that's exactly
what I did.

Now, fsevents installs without errors.
@dkaushik94
Copy link

No brainer but, in addition to the above versioning solutions (which work mostly), my team updated the yarn.lock file and I started getting this fsevents build error. I tried all combinations of versions but the problem was the yarn was caching some versioning details and was not letting it go even when reinstalled. I had to restart my system and it started working. Just putting this out there since all the caching and threading done by Yarn for faster installations, over long periods introduces package resolution problems. The good old restart your machine worked for me.

@paulmillr
Copy link
Member

Hey folks, we must ask maintainers of software which uses fsevents to upgrade to fsevents 2, which doesn't have these problems. Please comment in issues mentioned in #325.

@Jefh15
Copy link

Jefh15 commented Jun 6, 2020

solve using this code:

npm install npm@latest -g

@sallyhill
Copy link

sallyhill commented Aug 20, 2020

Be aware that adding the resolutions workaround to your package.json will fix things on your Mac, but break things in your Linux builds.

yarnpkg/yarn#7590

Seems like best thing is to chase up your dependencies and create PRs for those using older versions of fsevents.

If I run yarn with the resolution in place, and then delete the resolution from the package.json, commiting just the yarn.lock, I get the best of both worlds. Does anyone know of a reason not to do this? Running yarn upgrade after editing the lock file in this way, without saving the package.json seems fine. Full rebuilds of the yarn.lock from my package.json without the package.json resolution don't reproduce the fsevents bug either.

@rbrcurtis
Copy link

Had this issue with fsevents@1.2.7, solved it by upgrading the package that was using fsevents (found via yarn why fsevents) which results in upgrading fsevents to 1.2.13, solving the issue.

@softmantk
Copy link

  1. removed rm -rf node_modeuls/
  2. deleted lock file rm package-lock.json
  3. did fresh install npm i

These steps worked for me

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

No branches or pull requests