Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snyk couldn't patch the specified vulnerabilities because GNU's patch is not available. #1711

Closed
PremkumarAgrawal opened this issue Nov 20, 2016 · 21 comments
Assignees

Comments

@PremkumarAgrawal
Copy link

Hello everyone
I am trying to initialize new MEAN project & facing this issue on PC & laptop both.

Snyk couldn't patch the specified vulnerabilities because GNU's patch is not available. Please install 'patch' and try again.

@adrukh
Copy link
Contributor

adrukh commented Nov 20, 2016

@PremkumarAgrawal please install binaries from https://git-scm.com/download/win, they include the required GNU patch.

I'm on the Snyk team and we are pushing for smoother windows support in the next releases!
See https://github.com/Snyk/snyk/issues/48#issuecomment-256260149 for more details.

@PremkumarAgrawal
Copy link
Author

Hey @adrukh thanks for responding..
I hav already install Git Bash & i have also set the environment variables also for it still i am facing the same issue, how i can overcome it.

@adrukh
Copy link
Contributor

adrukh commented Nov 20, 2016

Perhaps patch.exe is not in your %PATH%?

What command are you running when you see this error message? Is it npm install or something else?

@PremkumarAgrawal
Copy link
Author

Yaa its npm install

@adrukh
Copy link
Contributor

adrukh commented Nov 20, 2016

And if you just run patch.exe --help at the same prompt where you run npm install, do you get the help info or Bad command or filename?

@PremkumarAgrawal
Copy link
Author

I am getting
'patch.exe' is not recognized as an internal or external command, operable program or batch file.

after running patch.exe --help

@PremkumarAgrawal
Copy link
Author

@adrukh I got some links which are suggesting me to download & install patch.exe from this link http://gnuwin32.sourceforge.net/packages/patch.htm

What should I do...

@adrukh
Copy link
Contributor

adrukh commented Nov 20, 2016

IMPORTANT please refrain from using the gnuwin32.sourceforge... link as it points to an executable that does not comply with proper cli use.

Use https://git-scm.com/download/win instead.

As for the output you've shared, patch.exe is not in your %PATH%. Please add the proper folder where the binaries are installed and run npm install only when patch.exe --help works for you.

@PremkumarAgrawal
Copy link
Author

@adrukh Can you please tel me where I can find patch.exe after installing GIT from this given link https://git-scm.com/download/win. So that i can add patch.exe to my %PATH%

@PremkumarAgrawal
Copy link
Author

@adrukh I got patch.exe at this location C:\Program Files\Git\usr\bin\patch.exe after installing GIT, I set the PATH variable also & execute the command patch.exe --help found the same

'patch.exe' is not recognized as an internal or external command, operable program or batch file.

Did i used the proper patch.exe or I should use any one else..

@adrukh
Copy link
Contributor

adrukh commented Nov 20, 2016

The location is ok. Can you show the output of echo %PATH% from your prompt?

@PremkumarAgrawal
Copy link
Author

Yaa Here t is,

C:\ProgramData\Oracle\Java\javapath;C:\oraclexe\app\oracle\product\10.2.0\server \bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32 \WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\P rogram Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x 86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Java\jdk1.7.0_02\bin;C:\Program F iles (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL S erver\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\M anagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;F:\An droid Studio\android-sdk\tools\ant\bin;F:\Android Studio\tools;C:\Program Files\ nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;C:\Program Files\Git\u sr\bin\patch.exe;.;C:\Program Files\Java\jdk1.7.0_51\bin;.;C:\Users\Premkumar\Ap pData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\ Git\cmd;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin\patch.exe;

@adrukh
Copy link
Contributor

adrukh commented Nov 20, 2016

Change the added part from C:\Program Files\Git\usr\bin\patch.exe; to C:\Program Files\Git\usr\bin; and you're done!

@PremkumarAgrawal
Copy link
Author

@adrukh LET ME TRY...

@PremkumarAgrawal
Copy link
Author

Hey Thanks @adrukh patch issue is solved...

@clowenhg
Copy link
Contributor

Labeling this Documentation because, if I'm not mistaken, this is a known thing and we just don't have this info readily available yet.

Or @adrukh is there an ETA on the improved windows support? Don't want to spend time writing up documentation if this will all just sort of work next week.

@adrukh
Copy link
Contributor

adrukh commented Nov 21, 2016

@clowenhg thanks for documenting!

The improvement to bundle the patch.exe binary with snyk is on our roadmap but doesn't have a definitive release right now.

@clowenhg
Copy link
Contributor

@adrukh @rjVapes I've assigned you guys just to review that the relevant info is here (I don't know if there would be something missing). I'll write up the summary in the Readme.

@timelf123
Copy link
Contributor

@clowenhg If it's helpful, I remember recording a screencast/gif of this process (installing patch and adding to path) but I can't find the link! It may be in the gitter chat?

I thought it was in the snyk issue queue itself but don't see it https://github.com/Snyk/snyk/issues/45

@aviadatsnyk
Copy link

Hey!

The improved windows support is here! Currently, it's in beta and will be released soon. if you can't wait - we'd love for you to try it right now and make sure we got it right for you. If you encounter any issues - please report them either here or at https://github.com/Snyk/snyk/issues/48

To do this:

  1. npm install -g snyk@dev
  2. Try snyk test, snyk protect and snyk wizard to make sure you get the usual excellent snyk experience.

@adrukh
Copy link
Contributor

adrukh commented Dec 20, 2016

@liorkesos FYI ^^^ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants