When I’m trying to build a new version of our Electron app for MacOS it breaks at the final step of the builder. Log file:
ERROR electronBuilder: error while building installer: Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
at /Users/andreaswest/Documents/workspace/frontend/node_modules/builder-util/src/util.ts:129:16
at exithandler (child_process.js:310:5)
at ChildProcess.errorhandler (child_process.js:322:5)
at ChildProcess.emit (events.js:321:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
I’ve googled the error and found several threads that seem to indicate that Apple has removed Python 2.7 and replaced it with version 3.0 which breaks the current versions (and Meteor-Desktop is very far behind already).
I’m currently on version 22.8.1 of Electron-Builder and will try to update to the recommended 23.0.2 though at least one person also reported problems with that version.
UPDATE: Updating to version 23.0.2 or even 23.0.3 (latest version) leads to this error:
DEBUG electronBuilder: calling build from electron-builder
• electron-builder version=21.2.0 os=21.4.0
• writing effective config file=.desktop-installer/builder-effective-config.yaml
ERROR electronBuilder: error while building installer: Error: Function yaml.safeDump is removed in js-yaml 4. Use yaml.dump instead, which is now safe by default.
at /Users/andreaswest/Documents/workspace/frontend/node_modules/js-yaml/index.js:10:11
at serializeToYaml (/Users/andreaswest/Documents/workspace/frontend/node_modules/builder-util/src/util.ts:28:10)
at getSafeEffectiveConfig (/Users/andreaswest/Documents/workspace/frontend/node_modules/app-builder-lib/src/packager.ts:576:10)
at Packager._build (/Users/andreaswest/Documents/workspace/frontend/node_modules/app-builder-lib/src/packager.ts:354:45)
at Packager.build (/Users/andreaswest/Documents/workspace/frontend/node_modules/app-builder-lib/src/packager.ts:330:12)
at executeFinally (/Users/andreaswest/Documents/workspace/frontend/node_modules/builder-util/out/promise.js:14:18)
at InstallerBuilder.build (/Users/andreaswest/Documents/workspace/frontend/node_modules/meteor-desktop/lib/electronBuilder.js:348:13)
at MeteorDesktop.buildInstaller (/Users/andreaswest/Documents/workspace/frontend/node_modules/meteor-desktop/lib/index.js:117:13)
So I’m pretty much f$$$ed up - I have an important new version with several bug fixes but can’t deploy to the users waiting for it.
The Meteor-Desktop package is waiting since almost one month for a merge after @efrancis put in a lot of work to make the community version working (as it’s still on the last, unmaintained version of it’s former owner).
If anyone has any idea on how to overcome these problems it would be highly appreciated. I also have to admit that I’m only executing a former employees script so my knowledge about the whole build process and its quirks is limited.
A lot more work to be done still, but part of the problem is that I currently don’t have the time to manage everything. So either more people need to step up or I and others need to have the resources to be able to spend more time on FOSS.
Thank you Jan for merging it and updating the atmosphere packages as well.
I never had them installed in the past, so I wonder why it’s a requirement (according to the Readme).
However, when I now try to build the app for MacOS, I get the following error:
ERROR meteorApp: build was terminated by meteor-desktop as some errors were reported to stderr, you should see it above, also check meteor.log for more info, to ignore it use the --ignore-stderr "<string>"
I’ve checked the meteor.log file but it has no more info about any error:
Warning: The --production flag should only be used to simulate production
bundling for testing purposes. Use meteor build to create a bundle for
production deployment. See: https://guide.meteor.com/deployment.html
[[[[[ ~/Documents/workspace/frontend ]]]]]
=> Started proxy.
Local package version is up-to-date: accounts-base@1.9.0
Local package version is up-to-date: accounts-password@1.7.1
Local package version is up-to-date: allow-deny@1.1.0
Local package version is up-to-date: amplify@1.0.0
Local package version is up-to-date: arillo:flow-router-helpers@0.5.2
Local package version is up-to-date: autoupdate@1.7.0
Local package version is up-to-date: babel-compiler@7.6.2
Local package version is up-to-date: babel-runtime@1.5.0
Local package version is up-to-date: base64@1.0.12
Local package version is up-to-date: binary-heap@1.0.11
Local package version is up-to-date: blaze@2.5.0
Local package version is up-to-date: blaze-html-templates@1.2.1
Local package version is up-to-date: blaze-tools@1.1.1
Local package version is up-to-date: boilerplate-generator@1.7.1
Local package version is up-to-date: browser-policy@1.1.0
Local package version is up-to-date: browser-policy-common@1.0.11
Local package version is up-to-date: browser-policy-content@1.1.1
Local package version is up-to-date: browser-policy-framing@1.1.0
Local package version is up-to-date: caching-compiler@1.2.2
Local package version is up-to-date: caching-html-compiler@1.2.0
Local package version is up-to-date: callback-hook@1.3.0
Local package version is up-to-date: check@1.3.1
Local package version is up-to-date: chrismbeckett:toastr@2.1.2_1
Local package version is up-to-date: coffeescript@1.0.17
Local package version is up-to-date:
communitypackages:meteor-desktop-bundler@3.0.0
Local package version is up-to-date: cultofcoders:persistent-session@0.4.5
Local package version is up-to-date: ddp@1.4.0
Local package version is up-to-date: ddp-client@2.4.0
Local package version is up-to-date: ddp-common@1.4.0
Local package version is up-to-date: ddp-rate-limiter@1.0.9
Local package version is up-to-date: ddp-server@2.3.2
Local package version is up-to-date: deps@1.0.12
Local package version is up-to-date: diff-sequence@1.1.1
Local package version is up-to-date: dynamic-import@0.6.0
Local package version is up-to-date: ecmascript@0.15.1
Local package version is up-to-date: ecmascript-runtime@0.7.0
Local package version is up-to-date: ecmascript-runtime-client@0.11.0
Local package version is up-to-date: ecmascript-runtime-server@0.10.0
Local package version is up-to-date: ejson@1.1.1
Local package version is up-to-date: email@2.0.0
Local package version is up-to-date: es5-shim@4.8.0
Local package version is up-to-date: fetch@0.1.1
Local package version is up-to-date: geojson-utils@1.0.10
Local package version is up-to-date: hot-code-push@1.0.4
Local package version is up-to-date: html-tools@1.1.1
Local package version is up-to-date: htmljs@1.1.0
Local package version is up-to-date: http@1.4.3
Local package version is up-to-date: id-map@1.1.0
Local package version is up-to-date: inter-process-messaging@0.1.1
Local package version is up-to-date: jeremy:selectize@0.12.1_5
Local package version is up-to-date: jparker:crypto-core@0.1.0
Local package version is up-to-date: jparker:crypto-md5@0.1.1
Local package version is up-to-date: jparker:gravatar@0.5.1
Local package version is up-to-date: jquery@1.11.11
Local package version is up-to-date: kadira:blaze-layout@2.3.0
Local package version is up-to-date: kadira:flow-router@2.12.1
Local package version is up-to-date: lamhieu:hypersubs@0.3.4
Local package version is up-to-date: launch-screen@1.2.1
Local package version is up-to-date: livedata@1.0.18
Local package version is up-to-date: localstorage@1.2.0
Local package version is up-to-date: logging@1.2.0
Local package version is up-to-date: lookback:tooltips@0.6.1
Local package version is up-to-date: manuel:reactivearray@1.0.9
Local package version is up-to-date: meteor@1.9.3
Local package version is up-to-date: meteor-base@1.4.0
Local package version is up-to-date: meteorhacks:inject-initial@1.0.5
Local package version is up-to-date: meteorhacks:ssr@2.2.0
Local package version is up-to-date: minifier-css@1.5.4
Local package version is up-to-date: minifier-js@2.6.0
Local package version is up-to-date: minimongo@1.6.2
Local package version is up-to-date: mixmax:smart-disconnect@0.0.5
Local package version is up-to-date: mobile-experience@1.1.0
Local package version is up-to-date: mobile-status-bar@1.1.0
Local package version is up-to-date: modern-browsers@0.1.5
Local package version is up-to-date: modules@0.16.0
Local package version is up-to-date: modules-runtime@0.12.0
Local package version is up-to-date: mongo@1.11.0
Local package version is up-to-date: mongo-decimal@0.1.2
Local package version is up-to-date: mongo-dev-server@1.1.0
Local package version is up-to-date: mongo-id@1.0.7
Local package version is up-to-date: nitrolabs:cdn@1.3.0
Local package version is up-to-date: npm-bcrypt@0.9.3
Local package version is up-to-date: npm-mongo@3.9.0
Local package version is up-to-date: observe-sequence@1.0.16
Local package version is up-to-date: ordered-dict@1.1.0
Local package version is up-to-date: patrickleet:enquire@2.2.0_1
Local package version is up-to-date: peppelg:bootstrap-3-modal@1.0.4
Local package version is up-to-date: plusmore:reactive-responsive-helpers@1.1.0
Local package version is up-to-date: promise@0.11.2
Local package version is up-to-date: raix:handlebar-helpers@0.2.5
Local package version is up-to-date: random@1.2.0
Local package version is up-to-date: rate-limit@1.0.9
Local package version is up-to-date: react-fast-refresh@0.1.0
Local package version is up-to-date: reactive-dict@1.3.0
Local package version is up-to-date: reactive-var@1.0.11
Local package version is up-to-date: reload@1.3.1
Local package version is up-to-date: retry@1.1.0
Local package version is up-to-date: routepolicy@1.1.0
Local package version is up-to-date: service-configuration@1.0.11
Local package version is up-to-date: session@1.2.0
Local package version is up-to-date: sha@1.0.9
Local package version is up-to-date: shell-server@0.5.0
Local package version is up-to-date: socket-stream-client@0.3.1
Local package version is up-to-date: softwarerero:accounts-t9n@1.3.11
Local package version is up-to-date: spacebars@1.2.0
Local package version is up-to-date: spacebars-compiler@1.2.1
Local package version is up-to-date: srp@1.1.0
Local package version is up-to-date: standard-minifier-css@1.7.2
Local package version is up-to-date: standard-minifier-js@2.6.1
Local package version is up-to-date: templating@1.4.1
Local package version is up-to-date: templating-compiler@1.4.1
Local package version is up-to-date: templating-runtime@1.5.0
Local package version is up-to-date: templating-tools@1.2.0
Local package version is up-to-date: tracker@1.2.0
Local package version is up-to-date: ui@1.0.13
Local package version is up-to-date: underscore@1.0.10
Local package version is up-to-date: url@1.3.1
Local package version is up-to-date: useraccounts:bootstrap@1.14.2
Local package version is up-to-date: useraccounts:core@1.14.2
Local package version is up-to-date: useraccounts:flow-routing@1.14.2
Local package version is up-to-date: utilities:avatar@0.9.2
Local package version is up-to-date: webapp@1.10.1
Local package version is up-to-date: webapp-hashing@1.1.0
Local package version is up-to-date: yuukan:streamy@1.4.1
Local package version is up-to-date: zimme:active-route@2.3.2
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
=> Started MongoDB.
[meteor-desktop] not preparing desktop.asar because desktopHCP is set to false. Remove this plugin if you do not want to use desktopHCP.
It has never stopped so early in the build process. I have no idea what is wrong and why it stops at all.
For reference, these are my electron packages used in dev:
When I enabled desktopHCP: true I get the following error messages:
VERBOSE meteorApp: desktopHCP is enabled, checking for required packages
WARN meteorManager: desktopHCP requires some packages that are not added to project, will try to add them now
INFO meteorManager: adding packages to meteor project communitypackages:meteor-desktop-watcher@3.0.0 communitypackages:meteor-desktop-bundler@3.0.0
=> Errors while adding packages:
While selecting package versions:
error: Conflict: Constraint communitypackages:meteor-desktop-bundler@2.2.6 is
not satisfied by communitypackages:meteor-desktop-bundler 3.0.0.
Constraints on package "communitypackages:meteor-desktop-bundler":
* communitypackages:meteor-desktop-bundler@=3.0.0 <- top level
* communitypackages:meteor-desktop-bundler@2.2.6 <-
communitypackages:meteor-desktop-watcher 3.0.0
ERROR electronApp: error while checking for required packages: Error: Error: adding packages failed
at MeteorApp.ensureDesktopHCPPackages (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/dist/meteorApp.js:99:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
@storyteller - this seems to indicate that we forgot to update one more package which is now creating a constraint - are you able to identify where this restriction for meteor-desktop-bundler@2.2.6 is as I can’t find it?
@storyteller - still getting errors about package restraints as soon as I turn desktopHCP: true - see here:
VERBOSE meteorApp: desktopHCP is enabled, checking for required packages
WARN meteorManager: desktopHCP requires some packages that are not added to project, will try to add them now
INFO meteorManager: adding packages to meteor project communitypackages:meteor-desktop-watcher@3.0.0 communitypackages:meteor-desktop-bundler@3.0.0
=> Errors while adding packages:
While selecting package versions:
error: Conflict: Constraint communitypackages:meteor-desktop-bundler@2.2.6 is
not satisfied by communitypackages:meteor-desktop-bundler 3.0.0.
Constraints on package "communitypackages:meteor-desktop-bundler":
* communitypackages:meteor-desktop-bundler@=3.0.0 <- top level
* communitypackages:meteor-desktop-bundler@2.2.6 <-
communitypackages:meteor-desktop-watcher 3.0.0
ERROR electronApp: error while checking for required packages: Error: Error: adding packages failed
at MeteorApp.ensureDesktopHCPPackages (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/dist/meteorApp.js:99:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ElectronApp.build (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/dist/electronApp.js:286:7)
at async MeteorDesktop.run (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/dist/index.js:157:5)
Is there any other way to install the packages required by desktopHCP other than by turning this flag on?
Looks like oversight on my part with the versions. I have released a patch update for watcher which will solve the version issue, please give it a try.
I just tried with 3.0.1 update but still getting an issue back:
=> Errors while adding packages:
While selecting package versions:
error: Conflict: Constraint communitypackages:meteor-desktop-bundler@2.2.6 is
not satisfied by communitypackages:meteor-desktop-bundler 3.0.0.
Constraints on package "communitypackages:meteor-desktop-bundler":
* communitypackages:meteor-desktop-bundler@=3.0.0 <- top level
* communitypackages:meteor-desktop-bundler@2.2.6 <-
communitypackages:meteor-desktop-watcher 3.0.0
ERROR electronApp: error while checking for required packages: Error: Error: adding packages failed
at MeteorApp.ensureDesktopHCPPackages (/Users/max/Documents/GitHub/X.Hub/node_modules/@meteor-community/meteor-desktop/dist/meteorApp.js:99:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ElectronApp.build (/Users/max/Documents/GitHub/X.Hub/node_modules/@meteor-community/meteor-desktop/dist/electronApp.js:286:7)
at async MeteorDesktop.run (/Users/max/Documents/GitHub/X.Hub/node_modules/@meteor-community/meteor-desktop/dist/index.js:157:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! inspc-admin@ desktop: `meteor-desktop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the x-admin@ desktop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/max/.npm/_logs/2022-04-12T18_06_04_957Z-debug.log
Can confirm that disabling desktopHCP got the package to run
It’s such a pleasure to see this package updated. After trying it a few weeks ago with no luck, I had given up and started building a non-Meteor Electron version of my app… which felt like reinventing the wheel.
Meteor reset was performed before starting the build but the error persists and we’re unable to build for both Windows/Linux which worked before the update.