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

Cant start app in development in mac #10584

Open
Xutaotaotao opened this issue Jun 13, 2024 · 10 comments
Open

Cant start app in development in mac #10584

Xutaotaotao opened this issue Jun 13, 2024 · 10 comments
Labels
bug It's a bug

Comments

@Xutaotaotao
Copy link

Operating system

macOS

Joplin version

2.14

Desktop version info

2.14

Current behaviour

  1. git clone
  2. yarn install
  3. cd packages/app-desktop
  4. yarn start

Expected behaviour

can run success in development

Logs

xutaotao@mybook joplin % yarn install
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 992ms
➤ YN0000: ┌ Fetch step
➤ YN0019: │ temp-dir-npm-2.0.0-e8af180805-cc4f0404bf.zip appears to be unused - removing
➤ YN0019: │ terminal-kit-npm-3.0.2-d6b5b994f1-ba0e5f51dc.zip appears to be unused - removing
➤ YN0019: │ tesseract.js-npm-5.0.5-96ba770781-2cd9e6c58c.zip appears to be unused - removing
➤ YN0019: │ tree-kit-npm-0.8.7-f384c98aa0-f184e418f9.zip appears to be unused - removing
➤ YN0019: │ yaml-npm-2.4.0-c777792a53-3c25ebae34.zip appears to be unused - removing
➤ YN0000: └ Completed in 1m 16s
➤ YN0000: ┌ Link step
➤ YN0007: │ husky@patch:husky@npm%3A3.1.0#./.yarn/patches/husky-npm-3.1.0-5cc13e4e34.patch::version=3.1.0&hash=d9603f&locator=root%40workspace%3A. must be built because it never has been before or the last one failed
➤ YN0007: │ keytar@npm:7.9.0 must be built because it never has been before or the last one failed
➤ YN0007: │ sharp@npm:0.33.2 must be built because it never has been before or the last one failed
➤ YN0007: │ sqlite3@npm:5.1.6 [ea905] must be built because it never has been before or the last one failed
➤ YN0007: │ fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=d11327 must be built because it never has been before or the last one failed
➤ YN0007: │ canvas@npm:2.11.2 must be built because it never has been before or the last one failed
➤ YN0007: │ tesseract.js@npm:5.0.4 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-free@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ electron@npm:26.5.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:0.2.36 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0007: │ root@workspace:. must be built because it never has been before or the last one failed
➤ YN0007: │ @joplin/app-mobile@workspace:packages/app-mobile must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:1.2.36 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-regular-svg-icons@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-brands-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-regular-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0009: │ root@workspace:. couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/ty/9r8x3d5s659_1p678slwnc1w0000gn/T/xfs-cc48cde9/build.log)
➤ YN0000: └ Completed in 8m 39s
➤ YN0000: Failed with errors in 9m 57s

xutaotao@mybook joplin % cd packages/app-desktop
xutaotao@mybook app-desktop % yarn start
[16:34:31] Requiring external module ts-node/register
Error: Cannot find module 'readline/promises'
Require stack:

  • /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/buildDefaultPlugins.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/commands/buildAll.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/shared/require-or-import.js
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/index.js
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.m._compile (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions. [as .ts] (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/ts-node/src/index.ts:1621:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/buildDefaultPlugins.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/commands/buildAll.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/shared/require-or-import.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/index.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp/bin/gulp.js'
    ]
    }
    xutaotao@mybook app-desktop %
@Xutaotaotao Xutaotaotao added the bug It's a bug label Jun 13, 2024
@Xutaotaotao
Copy link
Author

node v16.15.0

@Xutaotaotao
Copy link
Author

When i change node to v20.3.0, also error ,but can start, when then window open ,show another error.

Error: Cannot find module './ElectronAppWrapper'

xutaotao@mybook app-desktop % yarn start                                              
[16:52:59] Requiring external module ts-node/register
[16:53:01] Using gulpfile ~/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts
[16:53:01] Starting 'before-start'...
[16:53:01] Starting 'compileScripts'...
[16:53:01] Starting 'compilePackageInfo'...
[16:53:01] Starting 'copyPluginAssets'...
[16:53:01] Starting 'copyApplicationAssets'...
[16:53:01] Starting 'updateIgnoredTypeScriptBuild'...
[16:53:01] Starting 'buildScriptIndexes'...
[16:53:01] Starting 'compileSass'...
Generating /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/commands/index.ts...
[16:53:02] Finished 'compileScripts' after 548 ms
Generated /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/packageInfo.js
[16:53:02] Finished 'compilePackageInfo' after 699 ms
Generated /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/style.min.css
[16:53:02] Finished 'compileSass' after 700 ms
[16:53:02] Finished 'updateIgnoredTypeScriptBuild' after 703 ms
Generating /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gui/MainScreen/commands/index.ts...
Generating /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gui/NoteEditor/commands/index.ts...
Generating /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gui/NoteList/commands/index.ts...
Copying to /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/tools/../gui/note-viewer/pluginAssets
Generating /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gui/NoteListControls/commands/index.ts...
Generating /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gui/Sidebar/commands/index.ts...
Generating /Users/xutaotao/Documents/ssss/joplin/packages/lib/commands/index.ts...
Generating /Users/xutaotao/Documents/ssss/joplin/packages/lib/services/database/migrations/index.ts...
Copying to /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/tools/../pluginAssets
[16:53:02] Finished 'buildScriptIndexes' after 977 ms
Copying packages/app-desktop/node_modules/tinymce => packages/app-desktop/vendor/lib/tinymce
[16:53:02] Finished 'copyPluginAssets' after 1.01 s
Copying packages/app-desktop/node_modules/@fortawesome/fontawesome-free/webfonts => packages/app-desktop/vendor/lib/@fortawesome/fontawesome-free/webfonts
Copying packages/app-desktop/node_modules/roboto-fontface/fonts => packages/app-desktop/vendor/lib/roboto-fontface/fonts
Copying packages/app-desktop/node_modules/codemirror/theme => packages/app-desktop/vendor/lib/codemirror/theme
Copying Assets/TinyMCE/langs => packages/app-desktop/vendor/lib/tinymce/langs
Copying packages/app-desktop/node_modules/tesseract.js-core => packages/app-desktop/build/tesseract.js-core
Copying packages/app-desktop/node_modules/@fortawesome/fontawesome-free/css/all.min.css => packages/app-desktop/vendor/lib/@fortawesome/fontawesome-free/css/all.min.css
Copying packages/app-desktop/node_modules/@joeattardi/emoji-button/dist/index.js => packages/app-desktop/vendor/lib/@joeattardi/emoji-button/dist/index.js
Copying packages/app-desktop/node_modules/codemirror/addon/dialog/dialog.css => packages/app-desktop/vendor/lib/codemirror/addon/dialog/dialog.css
Copying packages/app-desktop/node_modules/codemirror/lib/codemirror.css => packages/app-desktop/vendor/lib/codemirror/lib/codemirror.css
Copying packages/app-desktop/node_modules/mark.js/dist/mark.min.js => packages/app-desktop/vendor/lib/mark.js/dist/mark.min.js
Copying packages/app-desktop/node_modules/react-datetime/css/react-datetime.css => packages/app-desktop/vendor/lib/react-datetime/css/react-datetime.css
Copying packages/app-desktop/node_modules/roboto-fontface/css/roboto/roboto-fontface.css => packages/app-desktop/vendor/lib/roboto-fontface/css/roboto/roboto-fontface.css
Copying packages/app-desktop/node_modules/smalltalk/css/smalltalk.css => packages/app-desktop/vendor/lib/smalltalk/css/smalltalk.css
Copying packages/app-desktop/node_modules/smalltalk/img/IDR_CLOSE_DIALOG_H.png => packages/app-desktop/vendor/lib/smalltalk/img/IDR_CLOSE_DIALOG_H.png
Copying packages/app-desktop/node_modules/smalltalk/img/IDR_CLOSE_DIALOG.png => packages/app-desktop/vendor/lib/smalltalk/img/IDR_CLOSE_DIALOG.png
Copying packages/lib/services/plugins/sandboxProxy.js => packages/app-desktop/vendor/lib/@joplin/lib/services/plugins/sandboxProxy.js
Copying packages/app-desktop/node_modules/pdfjs-dist/build/pdf.worker.min.js => packages/app-desktop/build/pdf.worker.min.js
Copying packages/app-desktop/node_modules/tesseract.js/dist/worker.min.js => packages/app-desktop/build/tesseract.js/worker.min.js
[16:53:03] Finished 'copyApplicationAssets' after 1.6 s
[16:53:03] Finished 'before-start' after 1.6 s
App threw an error during load
Error: Cannot find module './ElectronAppWrapper'
Require stack:
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/main.js
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js
- 
    at node:internal/modules/cjs/loader:1084:15
    at Function._resolveFilename (node:electron/js2c/browser_init:2:117576)
    at node:internal/modules/cjs/loader:929:27
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/main.js:5:28)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Object..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
2024-06-13 16:53:24.631 Electron[74727:5350211] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

@laurent22
Copy link
Owner

Did you run yarn watch?

@Xutaotaotao
Copy link
Author

Did you run yarn watch?

use yarn watch

but also another error

xutaotao@mybook app-desktop % yarn start
[10:01:25] Requiring external module ts-node/register
Error: Cannot find module 'readline/promises'
Require stack:
- /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.js
- /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/buildDefaultPlugins.js
- /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/commands/buildAll.js
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/index.js
- /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions.<computed> [as .js] (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/buildDefaultPlugins.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/commands/buildAll.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/shared/require-or-import.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/index.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp/bin/gulp.js'
  ]
}

@laurent22
Copy link
Owner

If you recently pull the latest changes from the the dev branch, try to run yarn build again from the root

@Xutaotaotao
Copy link
Author

yarn build

xutaotao@mybook app-desktop % yarn build
[21:04:44] Requiring external module ts-node/register
Error: Cannot find module 'readline/promises'
Require stack:

  • /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/buildDefaultPlugins.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/commands/buildAll.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/shared/require-or-import.js
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/index.js
  • /Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.m._compile (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions. [as .ts] (/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/ts-node/src/index.ts:1621:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/utils/waitForCliInput.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/buildDefaultPlugins.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/default-plugins/commands/buildAll.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/gulpfile.ts',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/shared/require-or-import.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp-cli/index.js',
    '/Users/xutaotao/Documents/ssss/joplin/packages/app-desktop/node_modules/gulp/bin/gulp.js'
    ]
    }
    xutaotao@mybook app-desktop %

cant run success

@Xutaotaotao
Copy link
Author

I have pull the last change

@Xutaotaotao
Copy link
Author

I clear node_modules, and try angin

some error in install dependencies:

xutaotao@mybook app-desktop % yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 866ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 2s 96ms
➤ YN0000: ┌ Link step
➤ YN0007: │ husky@patch:husky@npm%3A3.1.0#./.yarn/patches/husky-npm-3.1.0-5cc13e4e34.patch::version=3.1.0&hash=d9603f&locator=root%40workspace%3A. must be built because it never has been before or the last one failed
➤ YN0007: │ keytar@npm:7.9.0 must be built because it never has been before or the last one failed
➤ YN0007: │ sharp@npm:0.33.2 must be built because it never has been before or the last one failed
➤ YN0007: │ sqlite3@npm:5.1.6 [ea905] must be built because it never has been before or the last one failed
➤ YN0007: │ canvas@npm:2.11.2 must be built because it never has been before or the last one failed
➤ YN0007: │ tesseract.js@npm:5.0.5 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-free@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ tesseract.js@npm:5.0.4 must be built because it never has been before or the last one failed
➤ YN0007: │ electron@npm:29.1.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:0.2.36 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0007: │ root@workspace:. must be built because it never has been before or the last one failed
➤ YN0007: │ @joplin/app-mobile@workspace:packages/app-mobile must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:1.2.36 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-regular-svg-icons@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-brands-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-regular-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0009: │ root@workspace:. couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/ty/9r8x3d5s659_1p678slwnc1w0000gn/T/xfs-b6594af3/build.log)
➤ YN0000: └ Completed in 7m 2s
➤ YN0000: Failed with errors in 7m 6s
xutaotao@mybook app-desktop % 

this build log error in

YN0000: [@joplin/app-desktop]: [10:01:50] Starting 'buildDefaultPlugins'...
➤ YN0000: [@joplin/app-desktop]: �[96m Building plugin io.github.jackgruber.backup at /var/folders/ty/9r8x3d5s659_1p678slwnc1w0000gn/T/default-plugin-builddvnyBY �[0m
➤ YN0000: [@joplin/app-desktop]: �[96m Switching to commit 52d898315cab259da638698cc41120e9fae593ef �[0m
➤ YN0000: [@joplin/app-desktop]: > git switch master
➤ YN0000: [@joplin/app-desktop]: git: 'switch' is not a git command. See 'git --help'.
➤ YN0000: [@joplin/app-desktop]: Error: Command failed with exit code 1: git switch master
➤ YN0000: [@joplin/app-desktop]: git: 'switch' is not a git command. See 'git --help'.
➤ YN0000: [@joplin/app-desktop]:     at makeError (/Users/xutaotao/Documents/ssss/joplin/packages/utils/node_modules/execa/lib/error.js:60:11)
➤ YN0000: [@joplin/app-desktop]:     at handlePromise (/Users/xutaotao/Documents/ssss/joplin/packages/utils/node_modules/execa/index.js:118:26)
➤ YN0000: [@joplin/app-desktop]:     at processTicksAndRejections (node:internal/process/task_queues:95:5) {
➤ YN0000: [@joplin/app-desktop]:   shortMessage: 'Command failed with exit code 1: git switch master',
➤ YN0000: [@joplin/app-desktop]:   command: 'git switch master',
➤ YN0000: [@joplin/app-desktop]:   escapedCommand: 'git switch master',
➤ YN0000: [@joplin/app-desktop]:   exitCode: 1,
➤ YN0000: [@joplin/app-desktop]:   signal: undefined,
➤ YN0000: [@joplin/app-desktop]:   signalDescription: undefined,
➤ YN0000: [@joplin/app-desktop]:   stdout: '',
➤ YN0000: [@joplin/app-desktop]:   stderr: "git: 'switch' is not a git command. See 'git --help'.",
➤ YN0000: [@joplin/app-desktop]:   failed: true,
➤ YN0000: [@joplin/app-desktop]:   timedOut: false,
➤ YN0000: [@joplin/app-desktop]:   isCanceled: false,
➤ YN0000: [@joplin/app-desktop]:   killed: false
➤ YN0000: [@joplin/app-desktop]: }
➤ YN0000: [@joplin/app-desktop]: Build directory /var/folders/ty/9r8x3d5s659_1p678slwnc1w0000gn/T/default-plugin-builddvnyBY
➤ YN0000: [@joplin/app-desktop]: Input is not from a TTY -- not waiting for input.
➤ YN0000: [@joplin/app-desktop]: �[96m Removed build directory �[0m
➤ YN0000: [@joplin/app-desktop]: [10:01:50] 'buildDefaultPlugins' errored after 71 ms
➤ YN0000: [@joplin/app-desktop]: [10:01:50] Error: Command failed with exit code 1: git switch master
➤ YN0000: [@joplin/app-desktop]: git: 'switch' is not a git command. See 'git --help'.
➤ YN0000: [@joplin/app-desktop]:     at makeError (/Users/xutaotao/Documents/ssss/joplin/packages/utils/node_modules/execa/lib/error.js:60:11)
➤ YN0000: [@joplin/app-desktop]:     at handlePromise (/Users/xutaotao/Documents/ssss/joplin/packages/utils/node_modules/execa/index.js:118:26)
➤ YN0000: [@joplin/app-desktop]:     at processTicksAndRejections (node:internal/process/task_queues:95:5)
➤ YN0000: [@joplin/app-desktop]: [10:01:50] 'build' errored after 1.11 s
➤ YN0000: [@joplin/app-desktop]: Process exited (exit code 1), completed in 5s 946ms
➤ YN0000: [@joplin/server]: Process started
➤ YN0000: [@joplin/app-mobile]: [10:01:51] Using gulpfile ~/Documents/ssss/joplin/packages/app-mobile/gulpfile.ts
➤ YN0000: [@joplin/app-mobile]: [10:01:51] Starting 'build'...
➤ YN0000: [@joplin/app-mobile]: [10:01:51] Starting 'buildInjectedJs'...
➤ YN0000: [@joplin/app-mobile]: [10:01:51] Starting 'beforeBundle'...
➤ YN0000: [@joplin/app-mobile]: [10:01:51] Finished 'beforeBundle' after 2.16 ms
➤ YN0000: [@joplin/app-mobile]: [10:01:51] Starting 'buildCodeMirrorEditor'...
➤ YN0000: [@joplin/app-mobile]: Building bundle: codeMirrorBundle...
➤ YN0000: [@joplin/server]: [10:01:53] Using gulpfile ~/Documents/ssss/joplin/packages/server/gulpfile.js
➤ YN0000: [@joplin/server]: [10:01:53] Starting 'build'...
➤ YN0000: [@joplin/server]: [10:01:53] Starting 'compilePackageInfo'...
➤ YN0000: [@joplin/server]: Generated /Users/xutaotao/Documents/ssss/joplin/packages/server/dist/packageInfo.js
➤ YN0000: [@joplin/server]: [10:01:53] Finished 'compilePackageInfo' after 49 ms
➤ YN0000: [@joplin/server]: [10:01:53] Finished 'build' after 52 ms
➤ YN0000: [@joplin/server]: Process exited (exit code 0), completed in 2s 818ms
➤ YN0000: [@joplin/app-mobile]: Compiling with Babel: /Users/xutaotao/Documents/ssss/joplin/packages/editor/node_modules/@replit/codemirror-vim/dist/index.cjs
➤ YN0000: [@joplin/app-mobile]: Compiling with Babel: /Users/xutaotao/Documents/ssss/joplin/packages/editor/node_modules/@replit/codemirror-vim/dist/index.cjs
➤ YN0000: [@joplin/app-mobile]: Compiling with Babel: /Users/xutaotao/Documents/ssss/joplin/packages/lib/string-utils-common.js
➤ YN0000: [@joplin/app-mobile]: Compiling with Babel: /Users/xutaotao/Documents/ssss/joplin/packages/lib/string-utils-common.js
➤ YN0000: [@joplin/app-mobile]: Compiling with Babel: /Users/xutaotao/Documents/ssss/joplin/packages/utils/dist/Logger.js
➤ YN0000: [@joplin/app-mobile]: Bundle codeMirrorBundle built:  asset CodeMirror.bundle.js 1.98 MiB [compared for emit] [minimized] [big] (name: main) 1 related asset
➤ YN0000: [@joplin/app-mobile]: runtime modules 823 bytes 4 modules
➤ YN0000: [@joplin/app-mobile]: modules by path ../editor/ 3.13 MiB 179 modules
➤ YN0000: [@joplin/app-mobile]: modules by path ../utils/ 737 KiB
➤ YN0000: [@joplin/app-mobile]:   modules by path ../utils/node_modules/moment/locale/*.js 512 KiB 137 modules
➤ YN0000: [@joplin/app-mobile]:   modules by path ../utils/node_modules/async-mutex/lib/*.js 12.2 KiB 6 modules
➤ YN0000: [@joplin/app-mobile]:   + 5 modules
➤ YN0000: [@joplin/app-mobile]: modules by path ../lib/ 29.7 KiB
➤ YN0000: [@joplin/app-mobile]:   modules by path ../lib/utils/ipc/ 26.7 KiB 4 modules
➤ YN0000: [@joplin/app-mobile]:   ../lib/string-utils-common.js 1.44 KiB [built] [code generated]
➤ YN0000: [@joplin/app-mobile]:   ../lib/utils/focusHandler.ts 1.55 KiB [built] [code generated]
➤ YN0000: [@joplin/app-mobile]: modules by path ./ 2.65 KiB
➤ YN0000: [@joplin/app-mobile]:   ./components/NoteEditor/CodeMirror/CodeMirror.ts 1.43 KiB [built] [code generated]
➤ YN0000: [@joplin/app-mobile]:   ./utils/ipc/WebViewToRNMessenger.ts 1.21 KiB [built] [code generated]
➤ YN0000: [@joplin/app-mobile]: 
➤ YN0000: [@joplin/app-mobile]: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (1.91 MiB).
➤ YN0000: [@joplin/app-mobile]: This can impact web performance.
➤ YN0000: [@joplin/app-mobile]: Assets: 
➤ YN0000: [@joplin/app-mobile]:   CodeMirror.bundle.js (1.98 MiB)

the full build.log file
build.log

@Xutaotaotao
Copy link
Author

Is this file has some problems ?
joplin/packages/default-plugins/buildDefaultPlugins.ts
in

await execCommand(['git', 'switch', repositoryData.branch])

@Xutaotaotao
Copy link
Author

I sloved it!!!

Two steps:

1.upgrade git,
2.change packages/default-plugins/utils/waitForCliInput.ts

dont use readline/promises

const waitForCliInput = async () => {
  process.stdout.write('\x1b[92m[Press enter to continue]\x1b[0m ');
  
  return new Promise<void>((resolve) => {
    const onData = () => {
      process.stdin.removeListener('data', onData);
      console.log('Continuing...');
      resolve();
    };

    process.stdin.once('data', onData);
  });
};


export default waitForCliInput;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

2 participants