-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
desktop application doesn't run when build is completed #6645
Comments
Issue Status: 🆕 *Untriaged*🆕 Untriaged The team has not yet reviewed the issue. We usually do it within one business day. This is an automatic reply by the bot. |
Due to some issues on the package manager (hoisting) + electron compatibility issues, the electron build will be done in two stages.
Below is a script that I used for debugging build issues on MacOS. I think you can easily adopt it for windows as well. #!/bin/bash
echo "step 1: clean up"
find . -name "node_modules" -prune -exec rm -rf '{}' +
# git clean -dfX
git checkout .
build_type=canary
echo "step 2: install web dependencies"
# firstly, build web static
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 SENTRYCLI_SKIP_DOWNLOAD=1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=1 yarn
echo "step 3: generate assets"
BUILD_TYPE="$build_type" yarn workspace @affine/electron generate-assets
# cleanup node_modules
find . -name "node_modules" -prune -exec rm -rf '{}' +
echo "step 4: install electron dependencies"
# install electron deps
yarn config set nmHoistingLimits workspaces
yarn config set enableScripts false
yarn config set nmMode classic
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn workspaces focus @affine/electron @affine/monorepo
echo "step 5: build native"
# build native
yarn workspace @affine/native build
yarn workspace @affine/storage build
echo "step 6: build electron"
# build electron
yarn workspace @affine/electron build
echo "step 7: package electron"
# package
SKIP_GENERATE_ASSETS=1 BUILD_TYPE="$build_type" HOIST_NODE_MODULES=1 yarn workspace @affine/electron package |
Thanks. I've tried cleared all the cache and follow the instructions. At F:\AFFiNE>yarn workspace @affine/storage build error: could not compile F:\AFFiNE> |
Oh, I forgot that you also need to install rust toolchain and then run |
Oh, sorry I missed the log you pasted. The issue here is that on Windows you may need to turn on symlink for git, otherwise
Afterwards you can try build |
I've done that, but still the error is same. F:\AFFiNE>git config --get core.symlinks F:\AFFiNE>git checkout packages/backend/storage/src/hashcash.rs DetailsF:\AFFiNE>yarn workspace @affine/storage build error: could not compile F:\AFFiNE> And do you think that this error could cause the exe upon |
Sorry, i made a mistake about the git command you should use, which should be The issue in your screenshot looks like you did not disable hoisting for the packager manager. As I said earlier:
Between each build steps, you have to remove all node_modules (including nested one) You need to follow #6645 (comment) carefully. |
@pengx17 I've tried again today from start, but its same; the final app is stuck. I don't know what I'm doing wrong. Kindly help me. |
What happened?
I am trying to build the desktop application by running
yarn make
inpackages/frontend/electron
, it builds the artifacts but when I open the exe, following error shows up sayingcan't find electron-updater
butelectron-updater
is in the node modules although theyarn install
was a success. I couldn't figure out, kindly help me to build the desktop app.Distribution version
Windows x64
What browsers are you seeing the problem on if you're using web version?
No response
Are you self-hosting?
Relevant log output
Anything else?
No response
The text was updated successfully, but these errors were encountered: