The question isn’t about how to configure n8n for inbound connections. The npm i command is installing n8n itself, and having trouble fetching some of the dependency npm modules because of (probably) a corporate outbound proxy that interferes with the certificates (trusted cert-chain) of the end-to-end https connection.
The options for making this work are usually limited to:
Tell npm to ignore SSL errors and fetch stuff anyway.
Configure npm to trust the corporate proxy’s certificate chain to eliminate the SSL errors.
Reconfigure the registry URLs where npm fetches modules to be http:// instead of https:// (which may not be possible if the npm registry doesn’t support non-SSL, and/or redirects to https anyway)
Use a VPN to tunnel past the corporate proxy (which is usually blocked from corporate networks)