It's very confusing, but yarn install fails (very rarely it doesn't, but I don't why).
Current dev branch commit cd3e7f485.
yarn install modifies a file in my source tree: packages/generator-joplin/package.json
But it fails as follows:
$ yarn install
➤ YN0000: · Yarn 4.9.2
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 663ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 1s 387ms
➤ YN0000: ┌ Link step
➤ YN0007: │ root@workspace:. 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/3d/576s_9xd0fn73g9zn9f6cxf40000gn/T/xfs-01a985bf/build.log)
➤ YN0000: └ Completed in 29s 301ms
➤ YN0000: · Failed with errors in 31s 610ms
/private/var/folders/3d/576s_9xd0fn73g9zn9f6cxf40000gn/T/xfs-01a985bf/build.log
# This file contains the result of Yarn building a package (root@workspace:.)
# Script name: postinstall
[17:46:34] Using gulpfile ~/data/work/joplin/gulpfile.js
[17:46:35] Starting 'build'...
> yarn run buildParallel
[@joplin/app-clipper]: npm warn Unknown user config "node_gyp". This will stop working in the next major version of npm.
[@joplin/app-clipper]:
[@joplin/app-clipper]: > joplin-webclipper-popup@0.1.0 postinstall
[@joplin/app-clipper]: > node postinstall.js && npm run build
[@joplin/app-clipper]:
[@joplin/app-clipper]: npm warn Unknown user config "node_gyp". This will stop working in the next major version of npm.
[@joplin/app-clipper]:
[@joplin/app-clipper]: > joplin-webclipper-popup@0.1.0 build
[@joplin/app-clipper]: > webpack --mode=production
[@joplin/app-clipper]:
[@joplin/app-clipper]: Browserslist: browsers data (caniuse-lite) is 10 months old. Please run:
[@joplin/app-clipper]: npx update-browserslist-db@latest
[@joplin/app-clipper]: Why you should do it regularly: https://github.com/browserslist/update-db#readme
[@joplin/app-clipper]: asset index.js 178 KiB [compared for emit] [minimized] (name: main) 1 related asset
[@joplin/app-clipper]: asset index.html 383 bytes [compared for emit]
[@joplin/app-clipper]: orphan modules 20.4 KiB [orphan] 7 modules
[@joplin/app-clipper]: runtime modules 972 bytes 5 modules
[@joplin/app-clipper]: modules by path ./node_modules/ 179 KiB 19 modules
[@joplin/app-clipper]: modules by path ./src/ 41.6 KiB
[@joplin/app-clipper]: ./src/index.js + 5 modules 23.5 KiB [built] [code generated]
[@joplin/app-clipper]: ./src/bridge.js + 2 modules 14.9 KiB [built] [code generated]
[@joplin/app-clipper]: ./src/randomClipperPort.js 395 bytes [built] [code generated]
[@joplin/app-clipper]: ./node_modules/css-loader/dist/cjs.js!./src/App.css 2.71 KiB [built] [code generated]
[@joplin/app-clipper]: webpack 5.97.1 compiled successfully in 2721 ms
[@joplin/app-clipper]:
[@joplin/app-clipper]: up to date, audited 351 packages in 5s
[@joplin/app-clipper]:
[@joplin/app-clipper]: 41 packages are looking for funding
[@joplin/app-clipper]: run `npm fund` for details
[@joplin/app-clipper]:
[@joplin/app-clipper]: 5 vulnerabilities (4 moderate, 1 high)
[@joplin/app-clipper]:
[@joplin/app-clipper]: To address all issues, run:
[@joplin/app-clipper]: npm audit fix
[@joplin/app-clipper]:
[@joplin/app-clipper]: Run `npm audit` for details.
[@joplin/onenote-converter]: ----------------------------------------------------------------
[@joplin/onenote-converter]: Not building onenote-converter because it is not a continuous integration environment.
[@joplin/onenote-converter]: Use IS_CONTINUOUS_INTEGRATION=1 env var if build is necessary.
[@joplin/onenote-converter]: ----------------------------------------------------------------
[@joplin/turndown]: npm warn Unknown user config "node_gyp". This will stop working in the next major version of npm.
[@joplin/turndown]:
[@joplin/turndown]: > @joplin/turndown@4.0.81 build-cjs
[@joplin/turndown]: > rollup -c config/rollup.config.cjs.mjs && rollup -c config/rollup.config.browser.cjs.mjs
[@joplin/turndown]:
[@joplin/turndown]: e[36m
[@joplin/turndown]: e[1msrc/turndown.jse[22m → e[1mlib/turndown.cjs.jse[22m...e[39m
[@joplin/turndown]: e[32mcreated e[1mlib/turndown.cjs.jse[22m in e[1m162mse[22me[39m
[@joplin/turndown]: e[36m
[@joplin/turndown]: e[1msrc/turndown.jse[22m → e[1mlib/turndown.browser.cjs.jse[22m...e[39m
[@joplin/turndown-plugin-gfm]:
[@joplin/turndown-plugin-gfm]: src/gfm.js → lib/turndown-plugin-gfm.cjs.js...
[@joplin/turndown-plugin-gfm]: created lib/turndown-plugin-gfm.cjs.js in 55ms
[@joplin/turndown]: e[32mcreated e[1mlib/turndown.browser.cjs.jse[22m in e[1m141mse[22me[39m
[@joplin/transcribe]: [17:46:54] Using gulpfile ~/data/work/joplin/packages/transcribe/gulpfile.js
[@joplin/transcribe]: [17:46:54] Starting 'build'...
[@joplin/transcribe]: [17:46:54] Starting 'compilePackageInfo'...
[@joplin/transcribe]: Generated /Users/tessus/data/work/joplin/packages/transcribe/dist/packageInfo.js
[@joplin/transcribe]: [17:46:54] Finished 'compilePackageInfo' after 49 ms
[@joplin/transcribe]: [17:46:54] Finished 'build' after 51 ms
[joplin]: [17:46:57] Using gulpfile ~/data/work/joplin/packages/app-cli/gulpfile.js
[joplin]: [17:46:57] Starting 'build'...
[joplin]: [17:46:57] Starting 'prepareBuild'...
[@joplin/app-desktop]: (node:51878) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
[@joplin/app-desktop]: (Use `node --trace-warnings ...` to show where the warning was created)
[@joplin/app-desktop]: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/tessus/data/work/joplin/packages/app-desktop/node_modules/@joplin/default-plugins/commands/buildAll' imported from /Users/tessus/data/work/joplin/packages/app-desktop/gulpfile.ts
[@joplin/app-desktop]: Did you mean to import "file:///Users/tessus/data/work/joplin/packages/default-plugins/commands/buildAll.js"?
[@joplin/app-desktop]: at finalizeResolution (node:internal/modules/esm/resolve:275:11)
[@joplin/app-desktop]: at moduleResolve (node:internal/modules/esm/resolve:860:10)
[@joplin/app-desktop]: at defaultResolve (node:internal/modules/esm/resolve:984:11)
[@joplin/app-desktop]: at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12)
[@joplin/app-desktop]: at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25)
[@joplin/app-desktop]: at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:739:38)
[@joplin/app-desktop]: at ModuleLoader.resolveSync (node:internal/modules/esm/loader:762:52)
[@joplin/app-desktop]: at #cachedResolveSync (node:internal/modules/esm/loader:723:25)
[@joplin/app-desktop]: at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:451:50)
[@joplin/app-desktop]: at new ModuleJobSync (node:internal/modules/esm/module_job:344:34) {
[@joplin/app-desktop]: code: 'ERR_MODULE_NOT_FOUND',
[@joplin/app-desktop]: url: 'file:///Users/tessus/data/work/joplin/packages/app-desktop/node_modules/@joplin/default-plugins/commands/buildAll'
[@joplin/app-desktop]: }
[joplin]: [17:46:57] Finished 'prepareBuild' after 91 ms
[joplin]: [17:46:57] Finished 'build' after 93 ms
[@joplin/app-mobile]: (node:51884) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
[@joplin/app-mobile]: (Use `node --trace-warnings ...` to show where the warning was created)
[@joplin/app-mobile]: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/tessus/data/work/joplin/packages/app-mobile/tools/buildInjectedJs/gulpTasks' imported from /Users/tessus/data/work/joplin/packages/app-mobile/gulpfile.ts
[@joplin/app-mobile]: Did you mean to import "./tools/buildInjectedJs/gulpTasks.js"?
[@joplin/app-mobile]: at finalizeResolution (node:internal/modules/esm/resolve:275:11)
[@joplin/app-mobile]: at moduleResolve (node:internal/modules/esm/resolve:860:10)
[@joplin/app-mobile]: at defaultResolve (node:internal/modules/esm/resolve:984:11)
[@joplin/app-mobile]: at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12)
[@joplin/app-mobile]: at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25)
[@joplin/app-mobile]: at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:739:38)
[@joplin/app-mobile]: at ModuleLoader.resolveSync (node:internal/modules/esm/loader:762:52)
[@joplin/app-mobile]: at #cachedResolveSync (node:internal/modules/esm/loader:723:25)
[@joplin/app-mobile]: at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:451:50)
[@joplin/app-mobile]: at new ModuleJobSync (node:internal/modules/esm/module_job:344:34) {
[@joplin/app-mobile]: code: 'ERR_MODULE_NOT_FOUND',
[@joplin/app-mobile]: url: 'file:///Users/tessus/data/work/joplin/packages/app-mobile/tools/buildInjectedJs/gulpTasks'
[@joplin/app-mobile]: }
[@joplin/server]: [17:46:58] Using gulpfile ~/data/work/joplin/packages/server/gulpfile.js
[@joplin/server]: [17:46:58] Starting 'build'...
[@joplin/server]: [17:46:58] Starting 'compilePackageInfo'...
[@joplin/server]: Generated /Users/tessus/data/work/joplin/packages/server/dist/packageInfo.js
[@joplin/server]: [17:46:58] Finished 'compilePackageInfo' after 48 ms
[@joplin/server]: [17:46:58] Finished 'build' after 49 ms
The command failed in workspace @joplin/app-desktop@workspace:packages/app-desktop with exit code 1
The command failed in workspace @joplin/app-mobile@workspace:packages/app-mobile with exit code 1
The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph
Failed with errors in 19s 470ms
[17:46:58] 'build' errored after 24 s
[17:46:58] Error: Command failed with exit code 1: yarn run buildParallel
[@joplin/app-clipper]: npm warn Unknown user config "node_gyp". This will stop working in the next major version of npm.
[@joplin/app-clipper]:
[@joplin/app-clipper]: > joplin-webclipper-popup@0.1.0 postinstall
[@joplin/app-clipper]: > node postinstall.js && npm run build
[@joplin/app-clipper]:
[@joplin/app-clipper]: npm warn Unknown user config "node_gyp". This will stop working in the next major version of npm.
[@joplin/app-clipper]:
[@joplin/app-clipper]: > joplin-webclipper-popup@0.1.0 build
[@joplin/app-clipper]: > webpack --mode=production
[@joplin/app-clipper]:
[@joplin/app-clipper]: Browserslist: browsers data (caniuse-lite) is 10 months old. Please run:
[@joplin/app-clipper]: npx update-browserslist-db@latest
[@joplin/app-clipper]: Why you should do it regularly: https://github.com/browserslist/update-db#readme
[@joplin/app-clipper]: asset index.js 178 KiB [compared for emit] [minimized] (name: main) 1 related asset
[@joplin/app-clipper]: asset index.html 383 bytes [compared for emit]
[@joplin/app-clipper]: orphan modules 20.4 KiB [orphan] 7 modules
[@joplin/app-clipper]: runtime modules 972 bytes 5 modules
[@joplin/app-clipper]: modules by path ./node_modules/ 179 KiB 19 modules
[@joplin/app-clipper]: modules by path ./src/ 41.6 KiB
[@joplin/app-clipper]: ./src/index.js + 5 modules 23.5 KiB [built] [code generated]
[@joplin/app-clipper]: ./src/bridge.js + 2 modules 14.9 KiB [built] [code generated]
[@joplin/app-clipper]: ./src/randomClipperPort.js 395 bytes [built] [code generated]
[@joplin/app-clipper]: ./node_modules/css-loader/dist/cjs.js!./src/App.css 2.71 KiB [built] [code generated]
[@joplin/app-clipper]: webpack 5.97.1 compiled successfully in 2721 ms
[@joplin/app-clipper]:
[@joplin/app-clipper]: up to date, audited 351 packages in 5s
[@joplin/app-clipper]:
[@joplin/app-clipper]: 41 packages are looking for funding
[@joplin/app-clipper]: run `npm fund` for details
[@joplin/app-clipper]:
[@joplin/app-clipper]: 5 vulnerabilities (4 moderate, 1 high)
[@joplin/app-clipper]:
[@joplin/app-clipper]: To address all issues, run:
[@joplin/app-clipper]: npm audit fix
[@joplin/app-clipper]:
[@joplin/app-clipper]: Run `npm audit` for details.
[@joplin/onenote-converter]: ----------------------------------------------------------------
[@joplin/onenote-converter]: Not building onenote-converter because it is not a continuous integration environment.
[@joplin/onenote-converter]: Use IS_CONTINUOUS_INTEGRATION=1 env var if build is necessary.
[@joplin/onenote-converter]: ----------------------------------------------------------------
[@joplin/turndown]: npm warn Unknown user config "node_gyp". This will stop working in the next major version of npm.
[@joplin/turndown]:
[@joplin/turndown]: > @joplin/turndown@4.0.81 build-cjs
[@joplin/turndown]: > rollup -c config/rollup.config.cjs.mjs && rollup -c config/rollup.config.browser.cjs.mjs
[@joplin/turndown]:
[@joplin/turndown]: e[36m
[@joplin/turndown]: e[1msrc/turndown.jse[22m → e[1mlib/turndown.cjs.jse[22m...e[39m
[@joplin/turndown]: e[32mcreated e[1mlib/turndown.cjs.jse[22m in e[1m162mse[22me[39m
[@joplin/turndown]: e[36m
[@joplin/turndown]: e[1msrc/turndown.jse[22m → e[1mlib/turndown.browser.cjs.jse[22m...e[39m
[@joplin/turndown-plugin-gfm]:
[@joplin/turndown-plugin-gfm]: src/gfm.js → lib/turndown-plugin-gfm.cjs.js...
[@joplin/turndown-plugin-gfm]: created lib/turndown-plugin-gfm.cjs.js in 55ms
[@joplin/turndown]: e[32mcreated e[1mlib/turndown.browser.cjs.jse[22m in e[1m141mse[22me[39m
[@joplin/transcribe]: [17:46:54] Using gulpfile ~/data/work/joplin/packages/transcribe/gulpfile.js
[@joplin/transcribe]: [17:46:54] Starting 'build'...
[@joplin/transcribe]: [17:46:54] Starting 'compilePackageInfo'...
[@joplin/transcribe]: Generated /Users/tessus/data/work/joplin/packages/transcribe/dist/packageInfo.js
[@joplin/transcribe]: [17:46:54] Finished 'compilePackageInfo' after 49 ms
[@joplin/transcribe]: [17:46:54] Finished 'build' after 51 ms
[joplin]: [17:46:57] Using gulpfile ~/data/work/joplin/packages/app-cli/gulpfile.js
[joplin]: [17:46:57] Starting 'build'...
[joplin]: [17:46:57] Starting 'prepareBuild'...
[@joplin/app-desktop]: (node:51878) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
[@joplin/app-desktop]: (Use `node --trace-warnings ...` to show where the warning was created)
[@joplin/app-desktop]: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/tessus/data/work/joplin/packages/app-desktop/node_modules/@joplin/default-plugins/commands/buildAll' imported from /Users/tessus/data/work/joplin/packages/app-desktop/gulpfile.ts
[@joplin/app-desktop]: Did you mean to import "file:///Users/tessus/data/work/joplin/packages/default-plugins/commands/buildAll.js"?
[@joplin/app-desktop]: at finalizeResolution (node:internal/modules/esm/resolve:275:11)
[@joplin/app-desktop]: at moduleResolve (node:internal/modules/esm/resolve:860:10)
[@joplin/app-desktop]: at defaultResolve (node:internal/modules/esm/resolve:984:11)
[@joplin/app-desktop]: at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12)
[@joplin/app-desktop]: at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25)
[@joplin/app-desktop]: at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:739:38)
[@joplin/app-desktop]: at ModuleLoader.resolveSync (node:internal/modules/esm/loader:762:52)
[@joplin/app-desktop]: at #cachedResolveSync (node:internal/modules/esm/loader:723:25)
[@joplin/app-desktop]: at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:451:50)
[@joplin/app-desktop]: at new ModuleJobSync (node:internal/modules/esm/module_job:344:34) {
[@joplin/app-desktop]: code: 'ERR_MODULE_NOT_FOUND',
[@joplin/app-desktop]: url: 'file:///Users/tessus/data/work/joplin/packages/app-desktop/node_modules/@joplin/default-plugins/commands/buildAll'
[@joplin/app-desktop]: }
[joplin]: [17:46:57] Finished 'prepareBuild' after 91 ms
[joplin]: [17:46:57] Finished 'build' after 93 ms
[@joplin/app-mobile]: (node:51884) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
[@joplin/app-mobile]: (Use `node --trace-warnings ...` to show where the warning was created)
[@joplin/app-mobile]: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/tessus/data/work/joplin/packages/app-mobile/tools/buildInjectedJs/gulpTasks' imported from /Users/tessus/data/work/joplin/packages/app-mobile/gulpfile.ts
[@joplin/app-mobile]: Did you mean to import "./tools/buildInjectedJs/gulpTasks.js"?
[@joplin/app-mobile]: at finalizeResolution (node:internal/modules/esm/resolve:275:11)
[@joplin/app-mobile]: at moduleResolve (node:internal/modules/esm/resolve:860:10)
[@joplin/app-mobile]: at defaultResolve (node:internal/modules/esm/resolve:984:11)
[@joplin/app-mobile]: at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12)
[@joplin/app-mobile]: at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25)
[@joplin/app-mobile]: at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:739:38)
[@joplin/app-mobile]: at ModuleLoader.resolveSync (node:internal/modules/esm/loader:762:52)
[@joplin/app-mobile]: at #cachedResolveSync (node:internal/modules/esm/loader:723:25)
[@joplin/app-mobile]: at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:451:50)
[@joplin/app-mobile]: at new ModuleJobSync (node:internal/modules/esm/module_job:344:34) {
[@joplin/app-mobile]: code: 'ERR_MODULE_NOT_FOUND',
[@joplin/app-mobile]: url: 'file:///Users/tessus/data/work/joplin/packages/app-mobile/tools/buildInjectedJs/gulpTasks'
[@joplin/app-mobile]: }
[@joplin/server]: [17:46:58] Using gulpfile ~/data/work/joplin/packages/server/gulpfile.js
[@joplin/server]: [17:46:58] Starting 'build'...
[@joplin/server]: [17:46:58] Starting 'compilePackageInfo'...
[@joplin/server]: Generated /Users/tessus/data/work/joplin/packages/server/dist/packageInfo.js
[@joplin/server]: [17:46:58] Finished 'compilePackageInfo' after 48 ms
[@joplin/server]: [17:46:58] Finished 'build' after 49 ms
The command failed in workspace @joplin/app-desktop@workspace:packages/app-desktop with exit code 1
The command failed in workspace @joplin/app-mobile@workspace:packages/app-mobile with exit code 1
The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph
Failed with errors in 19s 470ms
at makeError (/Users/tessus/data/work/joplin/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/tessus/data/work/joplin/node_modules/execa/index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async execCommand (/Users/tessus/data/work/joplin/gulpfile.js:27:17)
at async fn (/Users/tessus/data/work/joplin/gulpfile.js:64:5)
Sometimes it completes sucessfully when trying for the 2nd or 3rd time. Currently I have tried to run it 5 times and it still fails. 2 commits earlier (2c3719764) yarn install completed successfully after the 2nd try. However the 2 last commits only changed .po files.
I'm very puzzled by this. Any help is appreciated.