Npm install -g n8n self signed certificate error

Hello,

When I try to install n8n at work I get this error

npm i -g n8n

npm error code SELF_SIGNED_CERT_IN_CHAIN

npm error errno SELF_SIGNED_CERT_IN_CHAIN

npm error request to https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz failed, reason: self-signed certificate in certificate chain

What can I do?

Search for “npm ignore ssl” and you’ll find many suggestions for how to get around the issue, like this one.

Do you use internet proxy? If it yes, you can try to disable it first.
Anyway, check here for setup SSL

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:

  1. Tell npm to ignore SSL errors and fetch stuff anyway.
  2. Configure npm to trust the corporate proxy’s certificate chain to eliminate the SSL errors.
  3. 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)
  4. Use a VPN to tunnel past the corporate proxy (which is usually blocked from corporate networks)

Ah sorry, my bad.