1

I am trying to install the dependencies of respec project of w3c and I am getting this error

npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> respec@19.6.0 prepublish C:\Users\MUJ\Desktop\respec
> npm run snyk-protect

> respec@19.6.0 snyk-protect C:\Users\MUJ\Desktop\respec
> snyk protect

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

npm ERR! code ELIFECYCLE 
npm ERR! errno 1
npm ERR! respec@19.6.0 snyk-protect: `snyk protect`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the respec@19.6.0 snyk-protect script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! respec@19.6.0 prepublish: `npm run snyk-protect`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the respec@19.6.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I tried install the patch by using the given commands. an this is the result that I am getting every time I run "npm install patch"

C:\Users\MUJ\Desktop\respec>npm install patch
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ patch@0.0.1
added 1 package in 22.255s

C:\Users\MUJ\Desktop\respec>npm install
npm WARN rollback Rolling back ajv@4.11.8 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\MUJ\Desktop\respec\node_modules\fsevents\node_modules'
npm WARN rollback Rolling back tar-pack@3.4.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\MUJ\Desktop\respec\node_modules\fsevents\node_modules'
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.

> respec@19.6.0 prepublish C:\Users\MUJ\Desktop\respec
> npm run snyk-protect

> respec@19.6.0 snyk-protect C:\Users\MUJ\Desktop\respec
> snyk protect

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

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! respec@19.6.0 snyk-protect: `snyk protect`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the respec@19.6.0 snyk-protect script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! respec@19.6.0 prepublish: `npm run snyk-protect`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the respec@19.6.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

What should I do to resolve this?

1 Answers1

0

This is not an npm issue: this is a Windows Operating System binary issue. This issue is covered in this post here.

Basically, you need to have patch.exe available on your environment %PATH% variable.

Seems you can find them here if you don't already have it installed.

Cheers.

Gerik
  • 660
  • 3
  • 11