krakend / playground-community

Get started with KrakenD. A docker compose with KrakenD and a fake api to play with
Apache License 2.0
419 stars 156 forks source link

npm ERR during installation! An error occurs. #48

Closed ogosengi closed 11 months ago

ogosengi commented 11 months ago

I try it in company. env firewall and Install env is windows WSL Ubuntu 22.04.2 LTS first problem is docker download, then I solved by "fake authority"(https://stackoverflow.com/questions/50619911/docker-get-https-registry-1-docker-io-v2-x509-certificate-signed-by-unkno).

second. try again. docker-compose up then blow error "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN"

Could I have solution?

root@TAEWOO:/opt/krakend/playground-community-master# docker-compose up
Building web
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  23.04kB
Step 1/7 : FROM node:12-alpine
 ---> bb6d28039b8c
Step 2/7 : WORKDIR /home/app
 ---> Using cache
 ---> d035400f6383
Step 3/7 : ADD package.json /home/app
 ---> Using cache
 ---> e6fc714ac83f
Step 4/7 : RUN npm install
 ---> Running in 0dac6ea149da
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/express-jwt failed, reason: self signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-11-24T06_53_47_726Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1
ERROR: Service 'web' failed to build : Build failed
root@TAEWOO:/opt/krakend/playground-community-master# npm config get strict-ssl
false
alombarte commented 11 months ago

Hi @ogosengi ,

You can comment on the docker-compose these lines https://github.com/krakend/playground-community/blob/master/docker-compose.yml#L74-L78

# web:
#    build:
#      context: images/spa-auth-web
#    ports:
#      - "3000:3000"

and do a docker-compose up again. You don't need this to try KrakenD, other than trying the Auth0 integration

github-actions[bot] commented 8 months ago

This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.