Facing a build error on Mac

I am trying to setup project on Mac air M1 by following the steps as mentioned in the Build.md file.
But nothing is working correctly
I have followed all commands like:

brew install cocoapods
npm install
cd packages/app-desktop
npm start

Methods i have tried:

so how to resolve these errors
Please anyone help
I will be very thankful to you

 git clone https://github.com/shreyaansjain06/joplin.git
Cloning into 'joplin'...
remote: Enumerating objects: 108463, done.
remote: Total 108463 (delta 0), reused 0 (delta 0), pack-reused 108463
Receiving objects: 100% (108463/108463), 233.56 MiB | 9.48 MiB/s, done.
Resolving deltas: 100% (79681/79681), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'packages/app-cli/tests/support/photo-åäö.jpg'
  'packages/app-cli/tests/support/photo-åäö.jpg'
❯ cd joplin
❯ npm install
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated highlight.js@10.3.2: Potential vulnerability. Please upgrade to @latest

> postinstall
> npm run bootstrap --no-ci && npm run build


> bootstrap
> lerna bootstrap --force-local --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@joplin/tools'
lerna ERR! npm install stderr:
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
npm ERR!   LIBTOOL-STATIC Release/nothing.a
npm ERR!   TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR!   CXX(target) Release/obj.target/sharp/src/common.o
npm ERR! info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-darwin-arm64v8.tar.gz
npm ERR! ERR! sharp Prebuilt libvips 8.9.1 binaries are not yet available for darwin-arm64v8
npm ERR! info sharp Attempting to build from source via node-gyp but this may fail due to the above error
npm ERR! info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@17.2.0 | darwin | arm64
npm ERR! (node:63936) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/shreyaansjain/.node-gyp/17.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/shreyaansjain/.node-gyp/17.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/shreyaansjain/.node-gyp/17.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/sharp',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! ../src/common.cc:23:10: fatal error: 'vips/vips8' file not found
npm ERR! #include <vips/vips8>
npm ERR!          ^~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/17.2.0/bin/node" "/Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/shreyaansjain/Desktop/joplin/packages/tools/node_modules/sharp
npm ERR! gyp ERR! node -v v17.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shreyaansjain/.npm/_logs/2021-12-09T07_16_05_797Z-debug-0.log

lerna ERR! npm install exited 1 in '@joplin/tools'
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 1
npm ERR! path /Users/shreyaansjain/Desktop/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shreyaansjain/.npm/_logs/2021-12-09T07_15_32_585Z-debug-0.log
❯ cd packages/app-desktop
npm start

> @joplin/app-desktop@2.6.2 start
> gulp build && electron . --env dev --log-level debug --no-welcome --open-dev-tools

node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module '/Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/extend/index'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/glob-stream/index.js:7:14)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/extend/package.json',
  requestPath: 'extend'
}

Node.js v17.2.0

The real issue seems to be this:

Try looking here https://github.com/lovell/sharp/issues/1882

Thanks for the reply
But the error did not resolve even after it i resolved some issues by these links but not able to solve all:

This is error which i am not able to solve so i need you help in it
Thank You

 npm start


> @joplin/app-desktop@2.6.2 start
> gulp build && electron . --env dev --log-level debug --no-welcome --open-dev-tools

[18:33:38] Using gulpfile ~/Desktop/joplin/packages/app-desktop/gulpfile.js
[18:33:38] Starting 'build'...
[18:33:38] Starting 'compileScripts'...
[18:33:38] Starting 'compilePackageInfo'...
[18:33:38] Starting 'copyPluginAssets'...
[18:33:38] Starting 'copyTinyMceLangs'...
[18:33:38] Starting 'updateIgnoredTypeScriptBuild'...
[18:33:38] Starting 'buildCommandIndex'...
[18:33:38] Starting 'compileSass'...
Compiling /Users/shreyaansjain/Desktop/joplin/packages/app-desktop/tools/../gui/ExtensionBadge.jsx...

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'babel-runtime/core-js/object/keys'
Require stack:
- /Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/babel-cli/lib/babel/index.js
- /Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/babel-cli/bin/babel.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/babel-cli/lib/babel/index.js:4:13)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/babel-cli/lib/babel/index.js',
    '/Users/shreyaansjain/Desktop/joplin/packages/app-desktop/node_modules/babel-cli/bin/babel.js'
  ]
}

Node.js v17.2.0

[18:33:38] The following tasks did not complete: build, compileScripts, compilePackageInfo, copyPluginAssets, copyTinyMceLangs, updateIgnoredTypeScriptBuild, buildCommandIndex, compileSass
[18:33:38] Did you forget to signal async completion?

Did you run npm install from the project root and did it complete without errors?

Yes I did npm install from root but it have errors

These are the errors i got while running npm install from root

 npm i

> postinstall
> npm run bootstrap --no-ci && npm run build


> bootstrap
> lerna bootstrap --force-local --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@joplin/server'
lerna ERR! npm install stderr:
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! code 1
npm ERR! path /Users/shreyaansjain/Desktop/joplin/packages/server/node_modules/aws-crt
npm ERR! command failed
npm ERR! command sh -c node ./scripts/install.js
npm ERR! info TOOL Using Unix Makefiles generator.
npm ERR! info TOOL Building only the install target, as specified from the command line.
npm ERR! ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! /Users/shreyaansjain/Desktop/joplin/packages/server/node_modules/cmake-js/lib/cMake.js:115
npm ERR!         throw new Error("CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.");
npm ERR!               ^
npm ERR! 
npm ERR! Error: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR!     at CMake.verifyIfAvailable (/Users/shreyaansjain/Desktop/joplin/packages/server/node_modules/cmake-js/lib/cMake.js:115:15)
npm ERR!     at CMake.build (/Users/shreyaansjain/Desktop/joplin/packages/server/node_modules/cmake-js/lib/cMake.js:287:10)
npm ERR!     at BuildSystem._invokeCMake (/Users/shreyaansjain/Desktop/joplin/packages/server/node_modules/cmake-js/lib/buildSystem.js:59:40)
npm ERR!     at async buildFromRemoteSource (/Users/shreyaansjain/Desktop/joplin/packages/server/node_modules/aws-crt/scripts/build.js:148:5)
npm ERR! 
npm ERR! Node.js v17.2.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shreyaansjain/.npm/_logs/2021-12-09T13_35_16_798Z-debug-0.log

lerna ERR! npm install exited 1 in '@joplin/server'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 1
npm ERR! path /Users/shreyaansjain/Desktop/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shreyaansjain/.npm/_logs/2021-12-09T13_34_37_004Z-debug-0.log

Well then you need to sort out these first before running npm start

I will just give up on build them on OSX or Window. They simply hate developers. Just install ubuntu or something just for developing.

Thanks a lot for your help i have successfully resolved all the errors and build the app.
Now i am trying to understand the codebase so i can contribute to it

You should post the issues you had and how you resolved them, it may help others in the same situation.

Though I suppose most of these may not be relevant soon with the upcoming switch to yarn. There will be brand new issues!

1 Like
npm ERR! Failed to execute '/opt/homebrew/Cellar/node/17.2.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build ...

This error i faced mainly after doing npm install in root directory for it

I am getting this is M1 Mac after i added

  "resolutions": {
    "minipass": "3.1.6"
  }

in package.json

npm i
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> root@ postinstall /Users/udittakkar/projects/joplin
> npm run bootstrap --no-ci && npm run build


> root@ bootstrap /Users/udittakkar/projects/joplin
> lerna bootstrap --force-local --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@joplin/app-desktop'
lerna ERR! npm install stdout:

> lzma-native@8.0.1 install /Users/udittakkar/projects/joplin/packages/app-desktop/node_modules/lzma-native
> node-gyp-build


lerna ERR! npm install stderr:
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
sh: node-gyp-build: command not found
npm WARN react-test-renderer@16.14.0 requires a peer of react@^16.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@1.3.1 (node_modules/7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-linux@1.3.1: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@2.2.0 (node_modules/7zip-bin-win):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.2.0: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! lzma-native@8.0.1 install: `node-gyp-build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the lzma-native@8.0.1 install 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/udittakkar/.npm/_logs/2021-12-20T08_30_31_631Z-debug.log

lerna ERR! npm install exited 1 in '@joplin/app-desktop'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ bootstrap: `lerna bootstrap --force-local --no-ci`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@ bootstrap 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/udittakkar/.npm/_logs/2021-12-20T08_30_31_673Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ postinstall: `npm run bootstrap --no-ci && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@ postinstall 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/udittakkar/.npm/_logs/2021-12-20T08_30_31_726Z-debug.log

Try pulling the latest dev -- there were changes to the build process merged today, maybe it'd resolve your issue.

Okay one more thing when i save a file after making changes it and formats the whole file

I suspect this may be a setting in your editor. E.g. VS Code doesn't format anything for me automatically.

Okay turned that off in VS code. Now i have experience in react but is there hot reloading in electron app? when i make any change how do i rebuild the whole electron application ?

The build document covers how to set up file watching and hot reloading (which still requires you to kill Joplin but it will come back by itself)

1 Like

FWIW I usually do rebuild the app every time I make a change. Or restart rather. It takes only a few seconds.

I have been too, I never trust the automation, just a couple of terminals and some up arrow presses