From 531c75f49e514788db2390490c4a64b4554d5067 Mon Sep 17 00:00:00 2001 From: Greg Palaci <1177690+gregpalaci@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:28:42 +0100 Subject: [PATCH] Update troubleshooting.md add troubleshoot fix for th http/https npm error --- docs/guides/troubleshooting.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/guides/troubleshooting.md b/docs/guides/troubleshooting.md index 827bf08..9fa5928 100644 --- a/docs/guides/troubleshooting.md +++ b/docs/guides/troubleshooting.md @@ -1,4 +1,4 @@ ---- +`--- title: &title Troubleshooting description: &description This page offers troubleshooting tips for WebContainers. head: @@ -112,3 +112,17 @@ Currently, WebContainers can only execute languages that are natively supported > `Cannot load native addon because loading addons is disabled`. The solution to this is to use an alternative to the native addon which is either fully implemented in JavaScript or can be compiled to WebAssembly. + +## `Protocol "https:" not supported. Expected "http:"` npm error + +In some environments it may be helpful to explicitly set an `.npmrc` with the registry specifed to overcome this. + +An example in your `files,js` add this with http:// + +```js +".npmrc": { + file: { + contents: `registry=http://registry.npmjs.org` + } +}, +```