Unexpected build problems

Yesterday I tried to build Joplin from git (as per your request, see the Mermaid question) and it stalled. It just got stuck on an "npm install". Removed everything, fresh git clone, same result. Several times.

This morning it built as usual.

The only explanation is that apparently the building process requires information from external web sites, and that one of the sites was (temporarily) unavailable.

So, there is still a risk that, should some sites disappear for whatever reason, there's no more Joplin. Having prebuilt images helps, but it is not a long term solution.

Without seeing the console output it’s hard to tell but npm packages being down is quite rare actually, I’ve never seen it even once, so I would guess it was something with your network connection.

It did happen with the left-pad package for example, and when it does it can affect any project, commercial or open source.

It was definitely not the network, my connection was fine.

Here's the console ouput, fwiw:

% cat update.sh
git co master
git co -- ElectronClient/app/package-lock.json
git pull
npm install
( cd Tools && npm install )
npm run copyLib
npm run tsc
cd ElectronClient/app
npm install

% sh update.sh
Already on 'master'
Your branch is up to date with 'origin/master'.
Already up to date.

husky@3.0.2 install /bulk/tmp/joplin/node_modules/husky
node husky install

husky > Setting up git hooks
husky > Done

husky@3.0.2 postinstall /bulk/tmp/joplin/node_modules/husky
opencollective-postinstall || true

Thank you for using husky!
If you rely on this package, please consider supporting our open collective:

Contribute - Open Collective

added 301 packages from 217 contributors and audited 976 packages in 3.202s

16 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

npm WARN tools@1.0.0 No description
npm WARN tools@1.0.0 No repository field.

added 137 packages from 150 contributors and audited 173 packages in 1.272s
found 0 vulnerabilities

joplin@1.0.0 copyLib /bulk/tmp/joplin
rsync --delete -a ReactNativeClient/lib/ ElectronClient/app/lib/

joplin@1.0.0 tsc /bulk/tmp/joplin

TSFILE: /bulk/tmp/joplin/ReactNativeClient/PluginAssetsLoader.js
TSFILE: /bulk/tmp/joplin/ReactNativeClient/PluginAssetsLoader.js.map
TSFILE: /bulk/tmp/joplin/ReactNativeClient/lib/JoplinServerApi.js
TSFILE: /bulk/tmp/joplin/ReactNativeClient/lib/JoplinServerApi.js.map
TSFILE: /bulk/tmp/joplin/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
TSFILE: /bulk/tmp/joplin/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js.map
TSFILE: /bulk/tmp/joplin/ElectronClient/app/lib/JoplinServerApi.js
TSFILE: /bulk/tmp/joplin/ElectronClient/app/lib/JoplinServerApi.js.map
TSFILE: /bulk/tmp/joplin/ElectronClient/app/gui/ShareNoteDialog.js
TSFILE: /bulk/tmp/joplin/ElectronClient/app/gui/ShareNoteDialog.js.map
TSFILE: /bulk/tmp/joplin/ElectronClient/app/lib/joplin-renderer/MdToHtml/rules/mermaid.js
TSFILE: /bulk/tmp/joplin/ElectronClient/app/lib/joplin-renderer/MdToHtml/rules/mermaid.js.map

sqlite3@4.1.1 install /bulk/tmp/joplin/ElectronClient/app/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[sqlite3] Success: "/bulk/tmp/joplin/ElectronClient/app/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" is installed via remote

ejs@3.0.1 postinstall /bulk/tmp/joplin/ElectronClient/app/node_modules/ejs
node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

core-js@3.6.4 postinstall /bulk/tmp/joplin/ElectronClient/app/node_modules/global-agent/node_modules/core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( GitHub - zloirock/core-js: Standard Library ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

Denis Pushkarev | creating core-js | Patreon

Also, the author of core-js ( zloirock (Denis Pushkarev) · GitHub ) is looking for a good job -)

electron@7.1.12 postinstall /bulk/tmp/joplin/ElectronClient/app/node_modules/electron
node install.js

At this point (after several minutes) I terminated the build.

It looks like NPM had some minor stability problems this week. Based on what I heard on the AUR forum, other people building Joplin were having problems as well.

Their post on the issue:

Unclear if this is what happened to you from the bit of log you posted, but it definitely happened to others.

1 Like