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

Node12 + fs-xattr < v0.3.0 has problems compiling #884

Closed
3 tasks done
donburks opened this issue May 24, 2019 · 9 comments · Fixed by #914
Closed
3 tasks done

Node12 + fs-xattr < v0.3.0 has problems compiling #884

donburks opened this issue May 24, 2019 · 9 comments · Fixed by #914
Labels
blocked/upstream Issues blocked by upstream bugs

Comments

@donburks
Copy link

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • 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 cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
npm WARN deprecated wrench@1.5.9: 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 graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated minimatch@0.3.0: 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

> fs-xattr@0.1.17 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 

> electron-forge@5.2.4 install /usr/local/lib/node_modules/electron-forge
> node tabtab-install.js

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

+ electron-forge@5.2.4
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?

None

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

Unrelated

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.

@malept malept changed the title Node12 + fs-xattr < v0.3.0 has problems compiling [5.x] Node12 + fs-xattr < v0.3.0 has problems compiling May 24, 2019
@malept
Copy link
Member

malept commented May 25, 2019

Does this happen with Electron Forge v6?

@malept malept changed the title [5.x] Node12 + fs-xattr < v0.3.0 has problems compiling Node12 + fs-xattr < v0.3.0 has problems compiling May 25, 2019
@malept
Copy link
Member

malept commented May 25, 2019

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

@malept malept added the blocked/upstream Issues blocked by upstream bugs label May 25, 2019
@donburks
Copy link
Author

donburks commented May 28, 2019

I'm not sure if you want me to create another issue for it, but something upstream is also requiring grpc@1.20.0, which is not compatible with Node 12. grpc@1.21.1 is the latest.

It also fails to compile when running electron-forge make

@donburks
Copy link
Author

See this issue

@malept
Copy link
Member

malept commented May 28, 2019

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.

@donburks
Copy link
Author

Thanks, I'll keep digging.

@malept
Copy link
Member

malept commented May 28, 2019

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).

@malept
Copy link
Member

malept commented May 28, 2019

Steps to resolving this issue:

  1. Approve/merge feat: use Node 8 syntax electron-userland/electron-installer-dmg#40
  2. Release a new major version of electron-installer-dmg
  3. New PR for Forge v6

@beorn
Copy link

beorn commented Dec 31, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/upstream Issues blocked by upstream bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants