This page helps you troubleshoot issues with WebContainers.
Cannot load native addon
--no-addons in WebContainers. As a result, you may encounter an error that says:
Cannot load native addon because loading addons is disabled.
npm ERR! code ERESOLVE
With the release of native npm support, the
npm command in a terminal no longer defaults to
turbo but instead uses the real npm cli. There are a few differences in how
turbo resolve dependencies and one of them is how they work with peer dependencies.
npm install might now fail on your project with an error saying
code ERESOLVE or
Conflicting peer dependency. That's because npm now automatically installs peer dependencies by default. This feature was introduced in npm 7. You have three options to fix this error:
- Remove your
npm install, and save your project; or
npm install --legacy-peer-deps; or
npm install --forceto bypass the conflicts.
Your project should load without your action, at least if dependencies are automatically installed. If an error is detected, StackBlitz will automatically re-run the installation step with
npm install --legacy-peer-deps. You can find more information on how to configure your project here.