the specified module could not be found. \\?\d:\next.js\firstapp\node_modules\@next\swc-win32-x64-msvc\next-swc.win32-x64-msvc.node

Viewed 4131

I have installed the next.js app. When I run the command

npm run dev

I got this error

the specified module could not be found. \?\d:\next.js\firstapp\node_modules@next\swc-win32-x64-msvc\next-swc.win32-x64-msvc.node

2 Answers

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

create a .babelrc file in the root folder of your project and include

{
    "presets": ["next/babel"]
}

then restart your application.

Related