Facing problems in setting up the project

I am trying to setup the project in my local system and it's showing some errors.

Steps I followed after reading the documentation https://github.com/laurent22/joplin/blob/dev/BUILD.md

  1. first i opened powershell using administrative rights and installed windows-build-tools using 'npm install -g windows-build-tools' in root of joplin folder i.e. D:\GSOC\joplin
  2. then i executed npm install in the root of joplin folder i.e. D:\GSOC\joplin

This didin't work for me as it showed "This is probably not a problem with npm. There is likely additional logging output above."

So I searched for the solution in stackoverflow (node.js - error: This is probably not a problem with npm. There is likely additional logging output above - Stack Overflow)

I deleted the entire project in my system cloned it again. This time I deleted all the package-lock.json files from the entire project as per the stackoverflow solution and executed npm install. Still it's not working.
The error is as follows:

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 fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

husky@3.1.0 install D:\GSOC\joplin\node_modules\husky
node husky install

husky > Setting up git hooks
husky > Done

husky@3.1.0 postinstall D:\GSOC\joplin\node_modules\husky
opencollective-postinstall || exit 0

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

Contribute - Open Collective

root@ postinstall D:\GSOC\joplin
npm run bootstrap --no-ci && npm run build

root@ bootstrap D:\GSOC\joplin
lerna bootstrap --no-ci

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

sqlite3@4.2.0 install D:\GSOC\joplin\packages\server\node_modules\sqlite3
node-pre-gyp install --fallback-to-build

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
unpack_sqlite_dep
'C:\Users\LSR' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 1. [D:\GSOC\joplin\packages\server\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\GSOC\joplin\packages\server\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\GSOC\joplin\packages\server\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

lerna ERR! npm install stderr:
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. (ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub)
npm WARN deprecated request@2.88.2: 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 har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
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
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=D:\GSOC\joplin\packages\server\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=D:\GSOC\joplin\packages\server\node_modules\sqlite3\lib\binding\node-v83-win32-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd D:\GSOC\joplin\packages\server\node_modules\sqlite3
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\GSOC\joplin\packages\server\node_modules\sqlite3\lib\binding\node-v83-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\GSOC\joplin\packages\server\node_modules\sqlite3\lib\binding\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess. (D:\GSOC\joplin\packages\server\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\GSOC\joplin\packages\server\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\GSOC\joplin\packages\server\node_modules\sqlite3
node-pre-gyp ERR! node -v v14.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
npm WARN rollback Rolling back string-width@2.1.1 failed (this is probably harmless): EPERM: operation not permitted, lstat 'D:\GSOC\joplin\packages\server\node_modules\wide-align\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.2.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.2.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! C:\Users\LSR\AppData\Roaming\npm-cache_logs\2021-03-18T06_59_07_733Z-debug.log

lerna ERR! npm install exited 1 in '@joplin/server'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ bootstrap: lerna bootstrap --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! C:\Users\LSR\AppData\Roaming\npm-cache_logs\2021-03-18T06_59_08_761Z-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! C:\Users\LSR\AppData\Roaming\npm-cache_logs\2021-03-18T06_59_12_170Z-debug.log

Please someone tell me what am I doing wrong.

Try this Having problem in setting up - #12 by roman_r_m

I followed the steps and now I am facing this error:


lerna ERR! npm install exited 1 in 'joplin'
lerna ERR! npm install stderr:
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\LSR\AppData\Roaming\npm-cache_cacache_logs\2021-03-18T10_01_38_739Z-debug.log

lerna ERR! npm install exited 1 in 'joplin'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ bootstrap: lerna bootstrap --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! C:\Users\LSR\AppData\Roaming\npm-cache_cacache_logs\2021-03-18T10_01_39_122Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@undefined postinstall: npm run bootstrap --no-ci && npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@undefined 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! C:\Users\LSR\AppData\Roaming\npm-cache_logs\2021-03-18T10_01_39_335Z-debug.log

When posting logs please enclose them in 3 backticks, otherwise it's impossible to read.

Is this the complete output? If not post it in full.
What's your node version?

My node version is v14.16.0 and npm version is 6.14.11.

The complete output is as follows :

PS D:\GSOC\joplin> npm ci
> husky@3.1.0 install D:\GSOC\joplin\node_modules\husky
> node husky install

husky > Setting up git hooks
husky > Done

> husky@3.1.0 postinstall D:\GSOC\joplin\node_modules\husky
> opencollective-postinstall || exit 0

Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate


> fsevents@1.2.13 install D:\GSOC\joplin\node_modules\fsevents
> node install.js


Skipping 'fsevents' build as platform win32 is not supported

> root@undefined postinstall D:\GSOC\joplin
> npm run bootstrap --no-ci && npm run build


> root@ bootstrap D:\GSOC\joplin
> lerna bootstrap --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 15 packages
lerna info Installing external dependencies
[         .........] - install dependencies: verb actions 13 actions, concurrency 8
lerna ERR! npm install exited 1 in 'joplin'
lerna ERR! npm install stderr:
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\LSR\AppData\Roaming\npm-cache\_cacache\_logs\2021-03-18T10_01_38_739Z-debug.log

lerna ERR! npm install exited 1 in 'joplin'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ bootstrap: `lerna bootstrap --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!     C:\Users\LSR\AppData\Roaming\npm-cache\_cacache\_logs\2021-03-18T10_01_39_122Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@undefined postinstall: `npm run bootstrap --no-ci && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@undefined 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!     C:\Users\LSR\AppData\Roaming\npm-cache\_logs\2021-03-18T10_01_39_335Z-debug.log
 

Also I installed windows-build-tools in powershell using administrative rights and it's output is as follows:

PS C:\Windows\system32> npm install --global windows-build-tools --vs2015
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> windows-build-tools@5.2.2 postinstall C:\Users\LSR\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js



Downloading BuildTools_Full.exe
[============================================>] 100.0% of 3.29 MB (2.19 MB/s)
Downloaded BuildTools_Full.exe. Saved to C:\Users\LSR\.windows-build-tools\BuildTools_Full.exe.

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!

Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Python 2.7.15 is already installed, not installing again.

Now configuring the Visual Studio Build Tools..

All done!

+ windows-build-tools@5.2.2
updated 1 package in 378.342s

Try npm cache verify and then npm ci again

Still the error persists. Output is as follows:

PS D:\GSOC\joplin> npm cache verify
Cache verified and compressed (~\AppData\Roaming\npm-cache\_cacache):
Content verified: 4839 (422284382 bytes)
Content garbage-collected: 2 (3946385 bytes)
Index entries: 7559
Finished in 7.8s
PS D:\GSOC\joplin> npm ci
npm WARN prepare removing existing node_modules/ before installation

> husky@3.1.0 install D:\GSOC\joplin\node_modules\husky
> node husky install

husky > Setting up git hooks
husky > Done

> husky@3.1.0 postinstall D:\GSOC\joplin\node_modules\husky
> opencollective-postinstall || exit 0

Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate


> fsevents@1.2.13 install D:\GSOC\joplin\node_modules\fsevents
> node install.js


Skipping 'fsevents' build as platform win32 is not supported

> root@undefined postinstall D:\GSOC\joplin
> npm run bootstrap --no-ci && npm run build


> root@ bootstrap D:\GSOC\joplin
> lerna bootstrap --no-ci

lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 15 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 4294963248 in '@joplin/server'
lerna ERR! npm install stderr:
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path D:\GSOC\joplin\packages\server\node_modules\.staging\typescript-9e3316e4\lib\typingsInstaller.js
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\GSOC\joplin\packages\server\node_modules\.staging\typescript-9e3316e4\lib\typingsInstaller.js'
npm ERR!  [Error: EPERM: operation not permitted, unlink 'D:\GSOC\joplin\packages\server\node_modules\.staging\typescript-9e3316e4\lib\typingsInstaller.js'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'D:\\GSOC\\joplin\\packages\\server\\node_modules\\.staging\\typescript-9e3316e4\\lib\\typingsInstaller.js'   
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\LSR\AppData\Roaming\npm-cache\_cacache\_logs\2021-03-18T11_23_59_003Z-debug.log

lerna ERR! npm install exited 4294963248 in '@joplin/server'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 4294963248
npm ERR! root@ bootstrap: `lerna bootstrap --no-ci`
npm ERR! Exit status 4294963248
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!     C:\Users\LSR\AppData\Roaming\npm-cache\_cacache\_logs\2021-03-18T11_24_01_334Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 4294963248
npm ERR! root@undefined postinstall: `npm run bootstrap --no-ci && npm run build`
npm ERR! Exit status 4294963248
npm ERR!
npm ERR! Failed at the root@undefined 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!     C:\Users\LSR\AppData\Roaming\npm-cache\_logs\2021-03-18T11_24_01_466Z-debug.log

After forking, I have to clone the project by being on the dev branch right?

Yes.

This looks like maybe you had the file open in another app when running npm.

Error: EPERM: operation not permitted, unlink 'D:\GSOC\joplin\packages\server\node_modules\.staging\typescript-9e3316e4\lib\typingsInstaller.js'