cerebroapp / cerebro

๐Ÿ”ต Cerebro is an open-source launcher to improve your productivity and efficiency
https://www.cerebroapp.com/
MIT License
8.33k stars 455 forks source link

fix(MacOS): Cannot find module 'nodobjc' #607

Closed joh6nn closed 1 year ago

joh6nn commented 2 years ago

Issue

I am a new user of Cerebro, so my apologies if I'm missing things or not understanding intended behaviors. After force installing the dependencies with yarn --force, I built with yarn package. There were no errors when building, and only 1 warning:

skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=  1) xxxxxxxxxxxxxREDACTEDxxxxxxxxxxxxxxxxxxx "xREDACTx-xxxx-xxxx-xxxx-xxREDACTEDxx"
     1 identities found
                                                Valid identities only
  1) xxxxxxxxxxxxxREDACTEDxxxxxxxxxxxxxxxxxxx "xREDACTx-xxxx-xxxx-xxxx-xxREDACTEDxx"
     1 valid identities found

I'm unfamiliar with the values displayed in the warning, so I've redacted them in case they're private. I can provide them if needed

When clicking on the app from the Applications folder, the screen briefly flashes, and then nothing else happens. From the terminal, I can see that a Cerebro process is running, but nothing is visible on the screen and no icon is present in the menu bar. Pressing ctrl+shift causes the active window to lose focus, but no window is displayed. Hitting ctrl+shift refocuses the previously active window. I believe this means that Cerebro is showing and hiding a window, but that the window is not visible.

Toggling "developerMode" in the config.json doesn't appear to have any effect.

Inspecting the app bundle from the terminal, I found the following file: /Applications/Cerebro.app/Contents/MacOS/Cerebro. I tried running that, and got the following output:

% /Applications/Cerebro.app/Contents/MacOS/Cerebro
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
objc[2115]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x245c8db50) and /Applications/Cerebro.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x109019d08). One of the two will be used. Which one is undefined.
Checking for update
Error: Error: Cannot find latest-mac.yml in the latest release artifacts (https://github.com/cerebroapp/cerebro/releases/download/v0.8.0/latest-mac.yml): HttpError: 404
"method: GET url: https://github.com/cerebroapp/cerebro/releases/download/v0.8.0/latest-mac.yml\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n"
Headers: {
  "server": "GitHub.com",
  "date": "Wed, 21 Sep 2022 16:09:33 GMT",
  "content-type": "text/plain; charset=utf-8",
  "vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
  "cache-control": "no-cache",
  "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
  "x-frame-options": "deny",
  "x-content-type-options": "nosniff",
  "x-xss-protection": "0",
  "referrer-policy": "no-referrer-when-downgrade",
  "expect-ct": "max-age=2592000, report-uri=\"https://api.github.com/_private/browser/errors\"",
  "content-security-policy": "default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src 'self' data:; script-src 'self'; style-src 'unsafe-inline'",
  "content-encoding": "gzip",
  "content-length": "29",
  "x-github-request-id": "210F:2E9D:12A1FED:1B9B712:632B373C"
}
    at createHttpError (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/httpExecutor.js:14:12)
    at ElectronHttpExecutor.handleResponse (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/httpExecutor.js:116:20)
    at ClientRequest.<anonymous> (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/httpExecutor.js:82:26)
    at ClientRequest.emit (node:events:527:28)
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:6917)
    at SimpleURLLoaderWrapper.emit (node:events:527:28)
    at Object.newError (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/index.js:47:19)
    at fetchData (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/providers/GitHubProvider.js:108:50)
    at async GitHubProvider.getLatestVersion (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/providers/GitHubProvider.js:115:23)
    at async MacUpdater.getUpdateInfoAndProvider (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:305:19)
    at async MacUpdater.doCheckForUpdates (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:319:24)
(node:2112) UnhandledPromiseRejectionWarning: Error: Cannot find latest-mac.yml in the latest release artifacts (https://github.com/cerebroapp/cerebro/releases/download/v0.8.0/latest-mac.yml): HttpError: 404
"method: GET url: https://github.com/cerebroapp/cerebro/releases/download/v0.8.0/latest-mac.yml\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n"
Headers: {
  "server": "GitHub.com",
  "date": "Wed, 21 Sep 2022 16:09:33 GMT",
  "content-type": "text/plain; charset=utf-8",
  "vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
  "cache-control": "no-cache",
  "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
  "x-frame-options": "deny",
  "x-content-type-options": "nosniff",
  "x-xss-protection": "0",
  "referrer-policy": "no-referrer-when-downgrade",
  "expect-ct": "max-age=2592000, report-uri=\"https://api.github.com/_private/browser/errors\"",
  "content-security-policy": "default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src 'self' data:; script-src 'self'; style-src 'unsafe-inline'",
  "content-encoding": "gzip",
  "content-length": "29",
  "x-github-request-id": "210F:2E9D:12A1FED:1B9B712:632B373C"
}
    at createHttpError (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/httpExecutor.js:14:12)
    at ElectronHttpExecutor.handleResponse (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/httpExecutor.js:116:20)
    at ClientRequest.<anonymous> (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/httpExecutor.js:82:26)
    at ClientRequest.emit (node:events:527:28)
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:6917)
    at SimpleURLLoaderWrapper.emit (node:events:527:28)
    at Object.newError (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/builder-util-runtime/out/index.js:47:19)
    at fetchData (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/providers/GitHubProvider.js:108:50)
    at async GitHubProvider.getLatestVersion (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/providers/GitHubProvider.js:115:23)
    at async MacUpdater.getUpdateInfoAndProvider (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:305:19)
    at async MacUpdater.doCheckForUpdates (/Applications/Cerebro.app/Contents/Resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:319:24)
(Use `Cerebro --trace-warnings ...` to show where the warning was created)
(node:2112) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

If I reboot, I sometimes get the icon in the menubar. The menu appears to be working (eg, the Donate Link opens the correct url), but the windows are still not visible. From the menu, I can get the main devtools window to open. Highlighting elements in the devtools seems to show that they're being created, just not displayed correctly:

Screen Shot 2022-09-21 at 12 02 38 PM

In sessions where I reboot and the icon appears in the menu, if I quit Cerebro from the menu and restart it, the icon doesn't reappear.

I wasn't able to find any logs, but if you tell me where to look I'll do my best to gather data from them.

dubisdev commented 2 years ago

Hi @joh6nn thanks for the info.

Let's see whats happening:

It would be a great help if you could access the console tab in the developer tools. Here โฌ‡๏ธ image

Please send a screenshot so I can see what's going wrong there.

Thanks again!

joh6nn commented 2 years ago

Output from the console is

Uncaught Error: Cannot find module 'nodobjc'
Require stack:
- /Applications/Cerebro.app/Contents/Resources/app.asar/main/index.html
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at i._resolveFilename (node:electron/js2c/renderer_init:33:1095)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at i._load (node:electron/js2c/renderer_init:33:356)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at index.js:16:27846
    at index.js:1:695
    at Object.darwin (index.js:211:1458)
Screen Shot 2022-09-21 at 1 54 22 PM
dubisdev commented 2 years ago

Seems to be an error with some of our dependencies. Maybe @cerebroapp/cerebro-ui is failing beacuse it is not bundled correctly

It 'nodobjc' is being imported here

https://github.com/cerebroapp/cerebro-ui/blob/288b913b9332906d5e0104b5ccf54e394a83b4d5/src/FileIcon/getFileIcon/mac.js#L3

But is not specified in the package.json of the package.

dubisdev commented 2 years ago

Please, try running yarn add nodobjc in the Cerebro repo and then package again the executable with yarn package. This should make the nodobjc module available.

joh6nn commented 2 years ago

new errors are a kind of progress, right? ๐Ÿ˜ƒ

% yarn add nodobjc
yarn add v1.22.19
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
warning " > @cerebroapp/cerebro-ui@2.0.0-alpha.2" has incorrect peer dependency "electron@19.0.7".
warning " > react-markdown@8.0.3" has unmet peer dependency "@types/react@>=16".
warning "eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] ๐Ÿ”จ  Building fresh packages...
[1/7] โ  electron
[6/7] โ  ref
[-/7] โ  waiting...
[-/7] โ  waiting...
error /Users/joh6nn/Code/cerebro/node_modules/ref: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/joh6nn/Code/cerebro/node_modules/ref
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@18.9.0 | darwin | arm64
gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/opt/homebrew/Cellar/node/18.9.0/libexec/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/joh6nn/Code/cerebro/node_modules/ref/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/joh6nn/Library/Caches/node-gyp/18.9.0/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/joh6nn/Library/Caches/node-gyp/18.9.0',
gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/joh6nn/Library/Caches/node-gyp/18.9.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/joh6nn/Code/cerebro/node_modules/ref',
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' ]
  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:222:43: error: too few arguments to function call, single argument 'isolate' was not specified
  bool persistent = info[3]->BooleanValue();
                    ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:408:8: note: 'BooleanValue' declared here
  bool BooleanValue(Isolate* isolate) const;
       ^
../src/binding.cc:253:38: error: too few arguments to function call, single argument 'context' was not specified
  size_t size = info[2]->Uint32Value();
                ~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                        ^
../src/binding.cc:253:10: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'size_t' (aka 'unsigned long')
  size_t size = info[2]->Uint32Value();
         ^      ~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:360:23: error: no matching constructor for initialization of 'String::Utf8Value'
    String::Utf8Value _str(in);
                      ^    ~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:517:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:510:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
../src/binding.cc:447:23: error: no matching constructor for initialization of 'String::Utf8Value'
    String::Utf8Value _str(in);
                      ^    ~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:517:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:510:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
../src/binding.cc:521:38: error: too few arguments to function call, single argument 'context' was not specified
  size_t size = info[1]->Uint32Value();
                ~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                        ^
../src/binding.cc:521:10: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'size_t' (aka 'unsigned long')
  size_t size = info[1]->Uint32Value();
         ^      ~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:550:44: error: too few arguments to function call, single argument 'context' was not specified
  uint32_t numZeros = info[1]->Uint32Value();
                      ~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                        ^
../src/binding.cc:550:12: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'uint32_t' (aka 'unsigned int')
  uint32_t numZeros = info[1]->Uint32Value();
           ^          ~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:582:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(int8, int8_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:583:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(uint8, uint8_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:584:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(int16, int16_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:585:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(uint16, uint16_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:586:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(int32, int32_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:587:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(uint32, uint32_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:588:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(int64, int64_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:589:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(uint64, uint64_t);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:590:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(float, float);
  ^~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:591:3: error: no matching member function for call to 'Set'
  SET_SIZEOF(double, double);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
  smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
  ~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/opt/homebrew/Cellar/node/18.9.0/bin/node" "/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/joh6nn/Code/cerebro/node_modules/ref
joh6nn commented 2 years ago

I ran yarn add typescript@3.7.0-beta, yarn add @types/react@16 and yarn add electron@19.0.7 to try and resolve the unmet dependencies warned about at the top, but that didn't help: same error when trying to add nodobjc

dubisdev commented 2 years ago

Thanks for your job @joh6nn

It seems that nodobjc is too old (last update is from 7 years ago)

I'll search for an alterntive to implement but will be hard as I develop on Windows. When the new implementation is ready I'll come back to tell you.

Thanks ๐Ÿ™Œ

dubisdev commented 2 years ago

Could you please tell us what node versiรณn are you using?

You can run node -v for that.

joh6nn commented 2 years ago

node is version 18.9.0

dubisdev commented 2 years ago

Ok, thank you