ElectronClient Error | File missing

I am trying to set up a development environment.
I am on a Windows PC. I forked and cloned the repo.
Then installed all the required files.

After running npm run start in the electron folder, I am getting this on the console:

$ npm run start

Joplin@1.0.185 start C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient
gulp build -L && electron . --env dev --log-level debug --no-welcome --open-dev-tools

But the app shows an error message : "Cannot find module './NoteContentPropertiesDialog.js' "
I have attached a screenshot.

@prash go to the root of the project and run npm install

delete the node modules from electron client folder go to the main folder and no npm intstall, it will work, make sure that you have a stable connection

I deleted the node modules folder and ran npm install.

This is what I got:

Joplin@1.0.185 postinstall C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient
npm run build && gulp electronRebuild

Joplin@1.0.185 build C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient
patch-package && gulp build

patch-package 6.2.0
Applying patches...
sax@1.2.4 :heavy_check_mark:
[10:55:03] Using gulpfile ~\Documents#Code\jop\joplin\ElectronClient\gulpfile.js
[10:55:03] Starting 'build'...
[10:55:03] Starting 'copyLib'...
[10:55:04] Finished 'copyLib' after 856 ms
[10:55:04] Starting 'compileScripts'...
[10:55:04] Finished 'compileScripts' after 14 ms
[10:55:04] Starting 'compilePackageInfo'...
[10:55:04] Finished 'compilePackageInfo' after 282 ms
[10:55:04] Starting 'copyPluginAssets'...
[10:55:04] Finished 'copyPluginAssets' after 58 ms
[10:55:04] Finished 'build' after 1.22 s
[10:55:05] Using gulpfile ~\Documents#Code\jop\joplin\ElectronClient\gulpfile.js
[10:55:05] Starting 'electronRebuild'...
Running: "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\tools/../node_modules/.bin/electron-rebuild.cmd" --arch ia32
[10:55:10] 'electronRebuild' errored after 4.54 s
[10:55:10] Error: Command failed: "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\tools/../node_modules/.bin/electron-rebuild.cmd" --arch ia32

  • Searching dependency tree
    × Rebuild Failed

An unhandled error occurred inside electron-rebuild
Traceback (most recent call last):
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\gyp_main.py", line 50, in
sys.exit(gyp.script_main())
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 547, in main
return gyp_main(args)
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2030, in GenerateOutput
sln_projects, project_objects, flat=msvs_version.FlatSolution())
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1787, in _GatherSolutionFolders
return _DictsToFolders('', root, flat)
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1740, in _DictsToFolders
for folder, contents in bucket.items():
AttributeError: 'MSVSProject' object has no attribute 'items'
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\mhima\Documents\#Code\jop\joplin\ElectronClient\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=7.1.12" "--arch=ia32" "--dist-url=https://electronjs.org/headers" "--build-from-source" "--module_name=fse" "--module_path=C:\Users\mhima\Documents\#Code\jop\joplin\ElectronClient\node_modules\babel-cli\node_modules\fsevents\lib\binding\Release\electron-v7.1-win32-ia32" "--remote_path=./v1.2.9/" "--package_name=fse-v1.2.9-electron-v7.1-win32-ia32.tar.gz" "--host=https://fsevents-binaries.s3-us-west-2.amazonaws.com"
gyp ERR! cwd C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\babel-cli\node_modules\fsevents
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1

Error: Traceback (most recent call last):
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\gyp_main.py", line 50, in
sys.exit(gyp.script_main())
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 547, in main
return gyp_main(args)
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2030, in GenerateOutput
sln_projects, project_objects, flat=msvs_version.FlatSolution())
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1787, in _GatherSolutionFolders
return _DictsToFolders('', root, flat)
File "C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1740, in _DictsToFolders
for folder, contents in bucket.items():
AttributeError: 'MSVSProject' object has no attribute 'items'
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\mhima\Documents\#Code\jop\joplin\ElectronClient\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=7.1.12" "--arch=ia32" "--dist-url=https://electronjs.org/headers" "--build-from-source" "--module_name=fse" "--module_path=C:\Users\mhima\Documents\#Code\jop\joplin\ElectronClient\node_modules\babel-cli\node_modules\fsevents\lib\binding\Release\electron-v7.1-win32-ia32" "--remote_path=./v1.2.9/" "--package_name=fse-v1.2.9-electron-v7.1-win32-ia32.tar.gz" "--host=https://fsevents-binaries.s3-us-west-2.amazonaws.com"
gyp ERR! cwd C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\babel-cli\node_modules\fsevents
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1
at SafeSubscriber._error (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\spawn-rx\lib\src\index.js:267:84)
at SafeSubscriber.__tryOrUnsub (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.error (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:156:26)
at Subscriber._error (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:92:26)
at Subscriber.error (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:72:18)
at MapSubscriber.Subscriber._error (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:92:26)
at MapSubscriber.Subscriber.error (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:72:18)
at SafeSubscriber._next (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\spawn-rx\lib\src\index.js:242:65)
at SafeSubscriber.__tryOrUnsub (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.next (C:\Users\mhima\Documents#Code\jop\joplin\ElectronClient\node_modules\rxjs\internal\Subscriber.js:143:22)

at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at ChildProcess.EventEmitter.emit (domain.js:466:23)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Joplin@1.0.185 postinstall: npm run build && gulp electronRebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Joplin@1.0.185 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\mhima\AppData\Roaming\npm-cache_logs\2020-02-28T05_25_10_388Z-debug.log

Try recloning and then run npm install again.
Might just work.

Are you building on windows? try running this first

npm install --global windows-build-tools