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

Building @electron-forge/maker-dmg@7.3.0 fails with both node 18 and 20 #3541

Open
3 tasks done
hbel opened this issue Mar 18, 2024 · 2 comments
Open
3 tasks done

Building @electron-forge/maker-dmg@7.3.0 fails with both node 18 and 20 #3541

hbel opened this issue Mar 18, 2024 · 2 comments

Comments

@hbel
Copy link

hbel commented Mar 18, 2024

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.4.2

Electron version

28.2.2

Operating system

macOS 14.4 (Silicon)

Last known working Electron Forge version

None

Expected behavior

I would expect to be able to install the @electron-forge/maker-dmg package

Actual behavior

Installting with yarn add @electron-forge/maker-dmg fails with the following error (fyi, the error is identical for node 20)

    gyp info it worked if it ends with ok
    gyp info using node-gyp@10.0.1
    gyp info using node@18.19.1 | darwin | arm64
    gyp info find Python using Python version 3.11.6 found at "/Users/hendrikbelitz/miniforge3/bin/python3"
    gyp info spawn /Users/hendrikbelitz/miniforge3/bin/python3
    gyp info spawn args [
    gyp info spawn args '/Users/hendrikbelitz/.nvm/versions/node/v18.19.1/lib/node_modules/npm/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/hendrikbelitz/git/mieterbund/word4mia/node_modules/macos-alias/build/config.gypi',
    gyp info spawn args '-I',
    gyp info spawn args '/Users/hendrikbelitz/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args '-I',
    gyp info spawn args '/Users/hendrikbelitz/.electron-gyp/28.2.2/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/hendrikbelitz/.electron-gyp/28.2.2',
    gyp info spawn args '-Dnode_gyp_dir=/Users/hendrikbelitz/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args '-Dnode_lib_file=/Users/hendrikbelitz/.electron-gyp/28.2.2/<(target_arch)/node.lib',
    gyp info spawn args '-Dmodule_root_dir=/Users/hendrikbelitz/git/mieterbund/word4mia/node_modules/macos-alias',
    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 spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    In file included from ../src/volume.cc:2:
    ../../nan/nan.h:688:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
        return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
                                          ^
    /Users/hendrikbelitz/.electron-gyp/28.2.2/include/node/v8-isolate.h:1343:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
      V8_DEPRECATE_SOON(
      ^
    /Users/hendrikbelitz/.electron-gyp/28.2.2/include/node/v8config.h:561:41: note: expanded from macro 'V8_DEPRECATE_SOON'
    #   define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                            ^
    In file included from ../src/volume.cc:2:
    ../../nan/nan.h:2548:8: error: no matching member function for call to 'SetAccessor'
      tpl->SetAccessor(
      ~~~~~^~~~~~~~~~~
    /Users/hendrikbelitz/.electron-gyp/28.2.2/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'v8::PropertyAttribute' to 'AccessControl' for 5th argument
      void SetAccessor(
           ^
    /Users/hendrikbelitz/.electron-gyp/28.2.2/include/node/v8-template.h:809:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
      void SetAccessor(
           ^
    In file included from ../src/volume.cc:2:
    ../../nan/nan.h:2596:8: error: no matching member function for call to 'SetAccessor'
      tpl->SetAccessor(
      ~~~~~^~~~~~~~~~~
    /Users/hendrikbelitz/.electron-gyp/28.2.2/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'v8::PropertyAttribute' to 'AccessControl' for 5th argument
      void SetAccessor(
           ^
    /Users/hendrikbelitz/.electron-gyp/28.2.2/include/node/v8-template.h:809:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
      void SetAccessor(
           ^
    1 warning and 2 errors generated.
    make: *** [Release/obj.target/volume/src/volume.o] Error 1
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack at ChildProcess.<anonymous> (/Users/hendrikbelitz/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
    gyp ERR! System Darwin 23.4.0
    gyp ERR! command "/Users/hendrikbelitz/.nvm/versions/node/v18.19.1/bin/node" "/Users/hendrikbelitz/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/hendrikbelitz/git/mieterbund/word4mia/node_modules/macos-alias
    gyp ERR! node -v v18.19.1
    gyp ERR! node-gyp -v v10.0.1
    gyp ERR! not ok 

Steps to reproduce

Create a new Electron project, including electron forge. Try to install the dmg maker.

Additional information

No response

@alexandrbig
Copy link

Hi, I have the same issue, but not with forge.
I am trying to package the application on M1 chip with exactly the same error. I know, that it is not informative at all, but just telling, that it might be not the forge.

In my case it stops with

  • rebuilding native dependency  name=cpu-features version=0.0.9
  • cannot build optional native dependency  name=cpu-features
                                             version=0.0.9
                                             cause=exit status 1
gyp info using node-gyp@10.1.0
gyp info using node@20.9.0 | darwin | arm64

@hbel
Copy link
Author

hbel commented Apr 10, 2024

@alexandrbig I moved some steps forward by upgrading electron to 29.x.

I ran into other problems than (mostly node packages compiled with the wrong node version), but most of that was solvable by running npm rebuild on the corresponding packages.

I was able to build a Universal Binary DMG package with that yesterday, although fixing all that stuff step by step and waiting several minutes each time for the next error message was quite tedious.

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

2 participants