Problem in building from source

I am facing problems in building the app from source

prebuild-install WARN install No prebuilt binaries found (target=14.11.0 runtime=node arch=x64 libc= platform=linux)
Package libsecret-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsecret-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsecret-1' found
gyp: Call to 'pkg-config --libs-only-l libsecret-1' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-48-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/keytar
gyp ERR! node -v v14.11.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
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":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@1.0.1 (node_modules/7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/glob-watcher/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.0 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.0: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/babel-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keytar@5.6.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keytar@5.6.0 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!     /home/koushik/.npm/_logs/2020-09-18T04_10_27_987Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! joplin@1.0.0 postinstall: `cd Tools && npm i && cd .. && cd ReactNativeClient && npm i && cd .. && cd ElectronClient && npm i && cd .. && cd CliClient && npm i && cd .. && gulp build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the joplin@1.0.0 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!     /home/koushik/.npm/_logs/2020-09-18T04_10_29_019Z-debug.log

When I run the command npm install I am getting these errors. Then when I go to ElectronClient and run npm start I get the following errors:

/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/index.js:14
    throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
    ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at getElectronPath (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/index.js:14:11)
    at Object.<anonymous> (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/index.js:18:18)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/cli.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Joplin@1.1.2 start: `gulp build && electron . --env dev --log-level debug --no-welcome --open-dev-tools`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the Joplin@1.1.2 start 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!     /home/koushik/.npm/_logs/2020-09-18T04_16_00_582Z-debug.log

Please help

You have to install libsecret-1-dev or the appropriate package depending on your Linux distro, which you omitted in your problem report.

That helped me to build the code and I was able to run npm install with dozens of warnings. But I still can't run the npm start script. Here's what I get on the console:

Debugger listening on ws://127.0.0.1:32775/6ead2906-3bc0-44b7-bbf6-7b4f5bba18bd
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

> Joplin@1.1.2 start /home/koushik/Documents/code/git-repo/joplin/ElectronClient
> gulp build && electron . --env dev --log-level debug --no-welcome --open-dev-tools

[23:10:29] Using gulpfile ~/Documents/code/git-repo/joplin/ElectronClient/gulpfile.js
[23:10:29] Starting 'build'...
[23:10:29] Starting 'compileScripts'...
[23:10:29] Starting 'compilePackageInfo'...
[23:10:29] Starting 'copyPluginAssets'...
[23:10:29] Starting 'copyTinyMceLangs'...
[23:10:29] Starting 'updateIgnoredTypeScriptBuild'...
[23:10:29] Starting 'compileExtensions'...
Copying to /home/koushik/Documents/code/git-repo/joplin/ElectronClient/tools/../gui/note-viewer/pluginAssets
Copying /home/koushik/Documents/code/git-repo/joplin/ElectronClient/tools/../../Modules/TinyMCE/langs => /home/koushik/Documents/code/git-repo/joplin/ElectronClient/tools/../node_modules/tinymce/langs
[23:10:29] Finished 'compileScripts' after 434 ms
[23:10:29] Finished 'compilePackageInfo' after 435 ms
Copying to /home/koushik/Documents/code/git-repo/joplin/ElectronClient/tools/../pluginAssets
[23:10:29] Finished 'compileExtensions' after 444 ms
[23:10:29] Starting 'copyLib'...
[23:10:29] Finished 'updateIgnoredTypeScriptBuild' after 445 ms
[23:10:29] Finished 'copyPluginAssets' after 456 ms
[23:10:29] Finished 'copyTinyMceLangs' after 456 ms
[23:10:29] Finished 'copyLib' after 53 ms
[23:10:29] Finished 'build' after 499 ms
/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/index.js:14
    throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
    ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at getElectronPath (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/index.js:14:11)
    at Object.<anonymous> (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/index.js:18:18)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron/cli.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Joplin@1.1.2 start: `gulp build && electron . --env dev --log-level debug --no-welcome --open-dev-tools`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the Joplin@1.1.2 start 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!     /home/koushik/.npm/_logs/2020-09-18T17_40_29_880Z-debug.log
Waiting for the debugger to disconnect...

Did you run npm i in the root of the repo?

Somehow your Electron install is borked. As the errorsays, pleaae delete it (/home/koushik/Documents/code/git-repo/joplin/ElectronClient/node_modules/electron) and start over.

In /home/koushik/Documents/code/git-repo/joplin run:

npm i