From 25137519ac027cb188912bcaa9b88aca03bd3515 Mon Sep 17 00:00:00 2001 From: Vlad Tansky Date: Tue, 12 Apr 2022 08:53:05 +0300 Subject: [PATCH 1/2] Update failed-loading-swc.md Apparently, Microsoft Visual C++ Redistributable is required for Windows users. > The issue is because the package is failing due to a missing library on the computer. fs-search requires Microsoft Visual C++ 2015 Redistributable (x64). > You can get the download here -> https://aka.ms/vs/17/release/vc_redist.x64.exe from https://stackoverflow.com/questions/69859120/the-specified-module-could-not-be-found-d-next-js-firstapp-node-modules-n --- errors/failed-loading-swc.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/errors/failed-loading-swc.md b/errors/failed-loading-swc.md index f1cc951c52fe819..6711f236124a88e 100644 --- a/errors/failed-loading-swc.md +++ b/errors/failed-loading-swc.md @@ -10,6 +10,8 @@ SWC requires a binary be downloaded that is compatible specific to your system. When on an M1 Mac and switching from a Node.js version without M1 support e.g. v14 to a version with e.g. v16, you may need a different swc dependency which can require re-installing `node_modules` (`npm i --force` or `yarn install --force`). +On Windows make sure you have Microsoft Visual C++ Redistributable installed. https://aka.ms/vs/17/release/vc_redist.x64.exe + Alternatively, you might need to allow optional packages to be installed by your package manager (remove `--no-optional` flag) for the package to download correctly. If SWC continues to fail to load you can opt-out by disabling `swcMinify` in your `next.config.js` or by adding a `.babelrc` to your project with the following content: From 3d0c7a9bb9ce7424a67e4d7067c98af3ff439392 Mon Sep 17 00:00:00 2001 From: Vlad Tansky Date: Tue, 12 Apr 2022 20:56:19 +0300 Subject: [PATCH 2/2] Update errors/failed-loading-swc.md Co-authored-by: JJ Kasper --- errors/failed-loading-swc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors/failed-loading-swc.md b/errors/failed-loading-swc.md index 6711f236124a88e..0e7d90d60305f89 100644 --- a/errors/failed-loading-swc.md +++ b/errors/failed-loading-swc.md @@ -10,7 +10,7 @@ SWC requires a binary be downloaded that is compatible specific to your system. When on an M1 Mac and switching from a Node.js version without M1 support e.g. v14 to a version with e.g. v16, you may need a different swc dependency which can require re-installing `node_modules` (`npm i --force` or `yarn install --force`). -On Windows make sure you have Microsoft Visual C++ Redistributable installed. https://aka.ms/vs/17/release/vc_redist.x64.exe +On Windows make sure you have Microsoft Visual C++ Redistributable installed. https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist Alternatively, you might need to allow optional packages to be installed by your package manager (remove `--no-optional` flag) for the package to download correctly.