npm install dependency error - AWS API Gateway Developer Portal

285 views Asked by At

I tried to customize the React front-end of the AWS API Gateway Developer Portal. But when installing the dependencies, the following error is generated.

npm ERR! npm ERR! code 128
npm ERR! npm ERR! An unknown git error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/ev1stensberg/generator.git
npm ERR! npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR! 
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.

I think the problem occurs when installing the "swagger-ui".

I tried the following command and try to install "swagger-ui" manually. But I get the same error.

npm install swagger-ui@github:awslabs/swagger-ui#apigw-fork-v4

npm ERR! npm ERR! code 128
npm ERR! npm ERR! An unknown git error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/ev1stensberg/generator.git
npm ERR! npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR! 
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.

Afterwards I tried installing different versions of "swagger-ui" through npm. But those versions are not compatible with the dev-portal frontend.

Is there someone who customizes the AWS dev-portal front-end by mitigating this dependency error?

1

There are 1 answers

0
Hassan Khalid On

Try adding the dependency in the package.json like this

"dependencies": {
    "swagger-ui": "git+https://github.com/awslabs/swagger-ui.git#apigw-fork-v4"
  }

you can also install it manually like this

npm install https://github.com/awslabs/swagger-ui#apigw-fork-v4