-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Although we hope you will be able to run the code simply by following the steps outlined in the README, we have compiled a list of common problems and their respective solutions. Many of these problems involve npm install
so they are difficult to have a defined "problem and solution".
If you are getting the error below, it's a good sign!
Found 324 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] postinstall: `electron-builder install-app-deps && tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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/user/.npm/_logs/2019-03-24T03_44_44_113Z-debug.log
This is a non issue, even though it produces this error, simply run npm start
and the app should run fine.
This is a general debugging line, it may solve your problems but chances are its something more involved. If this doesn't work, please look through the below problems and solutions. Run this in the root of the VisualGit folder.
npm cache clean -f && rm -rf node_modules && rm -rf package-lock.json && npm install
As noted in the README, you cannot have any spaces in the path of your VisualGit folder. This produces an error with a large stack trace, ending with the screenshot as per below.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
To fix this issue, simply move your VisualGit directory so that the path no longer has any spaces in it.
Unfortunately, this application requires Python 2. If you have Python 3 installed, you will need to update your PATH so that PYTHON points to your Python 2 installation. You can verify your python version by following below.
// Verify Python Version (in terminal/cmd)
> PYTHON --version
// Python Not Installed - Bad!
> PYTHON --version
PYTHON: command not found
// Python Version 3 - Bad!
> PYTHON --version
Python 3.X.X
// Python Version 2 - Good!
> PYTHON --version
Python 2.X.X
If your Python version is showing 3.X.X, then you will need to change your PATH variable so that it uses python2. The quickest way I have found to do this is to append the file location of python2 to the beginning of the PATH variable. If I had installed python2 in C:\python27
, then I would execute, in bash, "PATH=C:\python27:$PATH"
When running npm install on some machines, the install fails once it gets to installing nodegit. This produces a stack trace similar to below.
[nodegit] Running install script
...
Pre-built binaries not found for [email protected] and [email protected] (electron-v4.1 ABI, unknown) (falling back to source compile with node-gyp)
Warning: Missing input files:
node_modules/nodegit/......../libgit2/src/bswap.h
node_modules/nodegit/......../libgit2/src/merge_file.h
...
Building the projects in this solution one at a time.
error MSB4019: The imported project "C:\Microsoft.Cpp.Default. props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
(same as above repeated many times)
...
ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe`
failed with exit code: 1
...
[nodegit] ERROR - Could not finish install
[nodegit] ERROR - finished with error code: 1
To fix this, run the following command in an administrative terminal (i.e. click "run as administrator")
npm install --global windows-build-tools
Copyright © Team Project Hype-r Phlame. 2019. All Rights Reserved.