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

mac osx trying to compile fsevents on every npm install #340

Closed
211217613 opened this issue Oct 15, 2020 · 8 comments
Closed

mac osx trying to compile fsevents on every npm install #340

211217613 opened this issue Oct 15, 2020 · 8 comments

Comments

@211217613
Copy link

211217613 commented Oct 15, 2020

I get compile time errors every single time I try to install a package that depends on fsevents. This is very similar to #315

node --version
v12.18.4

This is the output of installing a node module that has fsevents as an optional dependency is this:

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
../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-ctor]
   : 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>(kFSEventStre...
          ^
/Users/r0v019v/Library/Caches/node-gyp/12.18.4/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated
      here
  V8_DEPRECATED("Use maybe version",
  ^
@SeanDunford
Copy link

Experiencing similar issues

Node lts 
node/14.15.0

Have fsevents installed through mocha.

npm ls 
Myapp
└─┬ mocha@8.2.0
  └─┬ chokidar@3.4.3
    └── fsevents@2.1.3
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.7 and node@14.15.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../node_modules/nan/nan.h:222:
In file included from ../node_modules/nan/nan_converters.h:67:
../node_modules/nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'

@paulmillr
Copy link
Member

you're downloading fsevents@1.2.7 though, so some pkg may be using it

@SeanDunford
Copy link

Oof. My mistake. Thanks for the catch @paulmillr looks like it was included from an old version of nodemon

└─┬ nodemon@1.18.10
  └─┬ chokidar@2.1.1
    └── UNMET OPTIONAL DEPENDENCY fsevents@1.2.7

@211217613
Copy link
Author

I'm still having this problem.

@pipobscure
Copy link
Contributor

This is correct behaviour, since there are no precompiled binaries for v1 available anymore.

In addition you should seriously update to v2 as v1 is no longer supported and may present a risk.

@211217613
Copy link
Author

I don't think we're explicitly using fsevents in our top-level package.json. I think it's a dependency of a dependency.

How can I figure that out? What top level dependency is using fsevents 1.x. I do see a few references to fsevents 1.x in the package-lock.json

@SeanDunford
Copy link

@211217613 - npm ls fsevents

Should output like this:

npm ls fsevents
myProject@0.0.1 myProject/pantheon/wellness
└─┬ babel-jest@24.9.0
  └─┬ @jest/transform@24.9.0
    └─┬ jest-haste-map@24.9.0
      └── fsevents@1.2.13

Here you can see it's included in jest.

@pipobscure
Copy link
Contributor

This has been updated to v2.1 with jest@25 so if you can update your babel-jest to something that depends on 25.1.0* (I'm guessing that babel-jest@25.1.0 would do it) this problem would just go away for you.

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

4 participants