Electron-forge: Node12 + fs-xattr < v0.3.0 has problems compiling

Created on 25 May 2019  路  9Comments  路  Source: electron-userland/electron-forge

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
Installing electron-forge v5.2.4 either in local project or globally, using npm install electron-forge (or with -g) produces the following behaviour:

npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
npm WARN deprecated [email protected]: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/electron-forge-vscode-win -> /usr/local/lib/node_modules/electron-forge/script/vscode.cmd
/usr/local/bin/forge -> /usr/local/lib/node_modules/electron-forge/dist/electron-forge.js
/usr/local/bin/electron-forge -> /usr/local/lib/node_modules/electron-forge/dist/electron-forge.js
/usr/local/bin/electron-forge-vscode-nix -> /usr/local/lib/node_modules/electron-forge/script/vscode.sh

> [email protected] install /usr/local/lib/node_modules/electron-forge/node_modules/fs-xattr
> node-gyp rebuild

  CXX(target) Release/obj.target/xattr/src/async.o
../src/async.cc:35:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(1, argv);
              ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/async.cc:52:46: error: no matching member function for call to 'ToObject'
    v8::Local<v8::Object> bufferObj = value->ToObject();
                                      ~~~~~~~^~~~~~~~
/Users/don/.node-gyp/12.3.1/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/Users/don/.node-gyp/12.3.1/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                    Local<Object> ToObject(Isolate* isolate) const);
                                  ^
../src/async.cc:129:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(2, argv);
              ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/async.cc:186:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
    callback->Call(2, argv);
              ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
3 warnings and 1 error generated.
make: *** [Release/obj.target/xattr/src/async.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
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/Cellar/node/12.3.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/electron-forge/node_modules/fs-xattr
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> [email protected] install /usr/local/lib/node_modules/electron-forge
> node tabtab-install.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/electron-forge/node_modules/fs-xattr):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
added 4 packages from 2 contributors and updated 1 package in 4.679s

I suspect that this is related to this issue which was resolved by the latest version of fs-xattr (v0.3.0).

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

Unrelated, problem is with install, not running the app

What command line arguments are you passing?


What does your config.forge data in package.json look like?


Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.

Upstream

Most helpful comment

It seems v5.2.4 still has this problem (appdmg/fs-xattr), and it's the latest official release? Will there be a bug fix of the v5.* line, or if not, any thoughts on releasing the v6.* line so it's more easily installable?

All 9 comments

Does this happen with Electron Forge v6?

Never mind, it does. This is a problem with a (very) upstream dependency: https://github.com/LinusU/node-appdmg/issues/176

I'm not sure if you want me to create another issue for it, but something upstream is also requiring [email protected], which is not compatible with Node 12. [email protected] is the latest.

It also fails to compile when running electron-forge make

Forge v5 or v6 does not have a dependency on grpc, I checked the yarn.lock for both. It's more likely a dependency of your app.

Thanks, I'll keep digging.

The fix for this will only be in Forge v6 as the fix in appdmg was released in a version that requires Node 8 (Forgev5 requires Node 6 compatibility).

Steps to resolving this issue:

  1. Approve/merge https://github.com/electron-userland/electron-installer-dmg/pull/40
  2. Release a new major version of electron-installer-dmg
  3. New PR for Forge v6

It seems v5.2.4 still has this problem (appdmg/fs-xattr), and it's the latest official release? Will there be a bug fix of the v5.* line, or if not, any thoughts on releasing the v6.* line so it's more easily installable?

Was this page helpful?
0 / 5 - 0 ratings