1

This is an application, built with Laravel, Vue and Vuex for shopping and user management.

Node version: 12.22.12

When compiling assets on a project, then I'm getting a looooooong error, that isn't stating clearly what is wrong.

  • Some gyp ERR!-errors
  • Some error: expected ';' after top declarator
  • Lots of deprecation notices.

The error I'm getting:

> fsevents@1.2.4 install /Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents
> node install

node-pre-gyp WARN Tried to download(403): 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.22.12 (node-v72 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 ../../nan/nan.h:221:
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())                            \
           ^
<scratch space>:161:1: note: expanded from here
ToBoolean
^
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8.h:2663:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
  ^
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8config.h:328: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:221:
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());                     \
              ^
<scratch space>:168:1: note: expanded from here
BooleanValue
^
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8.h:2701:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8config.h:328: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_new.h:189:
../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
  return scope.Escape(v8::Function::New( isolate
                                         ^~~~~~~
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8.h:186:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
      ^
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8.h:186:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8.h:190:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
  V8_INLINE Local(Local<S> that)
    





...
...
...
...
LOTS OF OTHER ERRORS WITH REPEATING PATTERN
...
...
...






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/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/MYUSERNAME/Library/Caches/node-gyp/12.22.12/include/node/v8config.h:328: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) {
                                                         ^
                                                         ;
31 warnings and 9 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/MYUSERNAME/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 21.5.0
gyp ERR! command "/Users/MYUSERNAME/.nvm/versions/node/v12.22.12/bin/node" "/Users/MYUSERNAME/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64" "--napi_version=8" "--node_abi_napi=napi"
gyp ERR! cwd /Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents
gyp ERR! node -v v12.22.12
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/MYUSERNAME/.nvm/versions/node/v12.22.12/bin/node /Users/MYUSERNAME/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=8 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1022:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Darwin 21.5.0
node-pre-gyp ERR! command "/Users/MYUSERNAME/.nvm/versions/node/v12.22.12/bin/node" "/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents
node-pre-gyp ERR! node -v v12.22.12
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok 
Failed to execute '/Users/MYUSERNAME/.nvm/versions/node/v12.22.12/bin/node /Users/MYUSERNAME/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=8 --node_abi_napi=napi' (1)

> uglifyjs-webpack-plugin@0.4.6 postinstall /Users/MYUSERNAME/projects/MYPROJECTNAME/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

added 1277 packages in 52.645s

The question

Based on that output, I can't tell what is actually failing here?
Or find any indication on how to continue from here...

Solution attempt 1: Add fsevents to devDependencies

I've played around with this quite a bit. And I can see that the error goes away if I install fsevents version ^1.2.9 under devDependencies. But I figured this out by simply fumbling around in the dark.

Zeth
  • 2,273
  • 4
  • 43
  • 91

0 Answers0