question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does anyone have an error when building like me?

See original GitHub issue

I confirm (by marking “x” in the [ ] below: [x]):


Summary

The Windows version does not build.

Environment

  • Operating System: macOS Ventura 13.0.1
  • Mattermost Desktop App version: 5.2.0
  • Mattermost Server version:

Steps to reproduce After downloading, try to build through the command below. npm run package:windows

Expected behavior The build should be complete.

Observed behavior An error occurs during the rebuild process.

rebuilding native dependencies  dependencies=macos-notification-state@2.0.1, windows-focus-assist@1.3.0 platform=win32 arch=ia32

The above process stops and the following message appears.

rebuilding native dependencies  dependencies=macos-notification-state@2.0.1, windows-focus-assist@1.3.0 platform=win32 arch=ia32
  ⨯ cannot execute  cause=exit status 1
                    errorOut=npm WARN using --force Recommended protections disabled.
    npm ERR! code 1
    npm ERR! path /desktop/desktop-5.2.0/node_modules/windows-focus-assist
    npm ERR! command failed
    npm ERR! command sh -c -- node-gyp rebuild
    npm ERR! SOLINK_MODULE(target) Release/focusassist.node
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@9.3.0
    npm ERR! gyp info using node@16.18.1 | darwin | x64
    npm ERR! gyp info find Python using Python version 3.11.0 found at "/usr/local/bin/python3"
    npm ERR! gyp info spawn /usr/local/bin/python3
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   '/desktop/desktop-5.2.0/node_modules/node-gyp/gyp/gyp_main.py',
    npm ERR! gyp info spawn args   'binding.gyp',
    npm ERR! gyp info spawn args   '-f',
    npm ERR! gyp info spawn args   'make',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/desktop/desktop-5.2.0/node_modules/windows-focus-assist/build/config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/desktop/desktop-5.2.0/node_modules/node-gyp/addon.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/Users/team1/.electron-gyp/21.2.0/include/node/common.gypi',
    npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    npm ERR! gyp info spawn args   '-Dvisibility=default',
    npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/team1/.electron-gyp/21.2.0',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/desktop/desktop-5.2.0/node_modules/node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/team1/.electron-gyp/21.2.0/<(target_arch)/node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=/desktop/desktop-5.2.0/node_modules/windows-focus-assist',
    npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    npm ERR! gyp info spawn args   '--depth=.',
    npm ERR! gyp info spawn args   '--no-parallel',
    npm ERR! gyp info spawn args   '--generator-output',
    npm ERR! gyp info spawn args   'build',
    npm ERR! gyp info spawn args   '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp info spawn make
    npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    npm ERR! ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
    npm ERR! ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libc++.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libc++.tbd (3 slices)
    npm ERR! ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd (3 slices)
    npm ERR! ld: dynamic executables or dylibs must link with libSystem.dylib for architecture i386
    npm ERR! clang: error: linker command failed with exit code 1 (use -v to see invocation)
    npm ERR! make: *** [Release/focusassist.node] Error 1
    npm ERR! gyp ERR! build error 
    npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
    npm ERR! gyp ERR! stack     at ChildProcess.onExit (/desktop/desktop-5.2.0/node_modules/node-gyp/lib/build.js:203:23)
    npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
    npm ERR! gyp ERR! System Darwin 22.1.0
    npm ERR! gyp ERR! command "/usr/local/bin/node" "/desktop/desktop-5.2.0/node_modules/.bin/node-gyp" "rebuild"
    npm ERR! gyp ERR! cwd /desktop/desktop-5.2.0/node_modules/windows-focus-assist
    npm ERR! gyp ERR! node -v v16.18.1
    npm ERR! gyp ERR! node-gyp -v v9.3.0
    npm ERR! gyp ERR! not ok

Possible fixes For version 5.1.0, the build is completed normally. If there is a difference, the ‘postinstall’ script has been added, but I don’t know if this is a problem.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bitdessertcommented, Dec 6, 2022

@devinbinnie Unfortunately, I just tried building it in a windows environment and it failed, but I know how to do it, so I’ll try building it and ask if there are any issues, thanks 😃

0reactions
devinbinniecommented, Dec 6, 2022

@devinbinnie Right. Both Windows apps and macOS apps have been packaged in macOS. Are you saying that mac apps should be packaged on macOS, and windows apps should be built on windows OS? It didn’t matter until version 5.1.0, but do I have to build it separately because of the macos-notification-state library and windows-focus-assist from 5.2?

Correct, this is a change in v5.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message when building upgraded framework target
Hello,. I have a workspace with a framework project from before Xcode 14. It links to four external frameworks(no cocoa pods or SPM)....
Read more >
How to find the reason for a failed Build without any error or ...
I noticed that if "Build + Intellisense" is selected in the Error List, it causes the error messages to be swallowed. Change this...
Read more >
List of message errors in Theme Park Tycoon 2
A message errors when you have a mistake or that you do wrong in TPT2. These are the list of message errors that...
Read more >
Project build errors and warnings (PRJxxxx) - Microsoft Learn
The Visual Studio compilers and build tools can report many kinds of errors and warnings.
Read more >
I get this error when building from source on mac
It gives me this error: Existing C# project ... Looking at a 61.67GB source code folder pre-build so if anyone has any tips...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found