nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.47k stars 280 forks source link

getting error in npm run dev for react vite. #4297

Closed webdev408 closed 10 months ago

webdev408 commented 10 months ago

Details

at Object. (C:\Users\proli\OneDrive\Desktop\Experiment\new-form\node_modules\rollup\dist\native.js:49:48) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Module._load (node:internal/modules/cjs/loader:938:12) { code: 'ERR_DLOPEN_FAILED' I have node v20.9.0. I know this version of node is not a problem because it was working well until this problem that arose just a couple of hours now. I don't know how to fix it. I reinstalled node and restarted code editor with new project file. Still the problem did not go away.

Node.js version

node js v20.9.0

Example code

at Object. (C:\Users\proli\OneDrive\Desktop\Experiment\new-form\node_modules\rollup\dist\native.js:49:48) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Module._load (node:internal/modules/cjs/loader:938:12) { code: 'ERR_DLOPEN_FAILED'

Operating system

Windows 10

Scope

code run time, would not start npm run dev

Module and version

Not applicable.

webdev408 commented 10 months ago

Today also did not resolve the issue after reading the doc and adjusting the vite.js.config as suggested. So, to chekck if my set up has problem I went back to create react app and every thing worked. Don't know how to resolve this.

I-NOZex commented 10 months ago

I had the same problem, this solved: https://github.com/lerna/lerna/issues/3612#issuecomment-1495469808 tl;dr, Microsoft Visual C++ 2015 Redistributable (x64) missing

webdev408 commented 10 months ago

Thank you so so much. I worked after I downloaded the https://aka.ms/vs/17/release/vc_redist.x64.exe. This was great but I do not understand what this has got to do with vite and react. Nonetheless, it worked well. Thanks a ton.

On Fri, Nov 17, 2023 at 4:57 PM Tiago Marques @.***> wrote:

I had the same problem, this solved: lerna/lerna#3612 (comment) https://github.com/lerna/lerna/issues/3612#issuecomment-1495469808 tl;dr, Microsoft Visual C++ 2015 Redistributable (x64) missing

— Reply to this email directly, view it on GitHub https://github.com/nodejs/help/issues/4297#issuecomment-1817165404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYJWGHLQJP3UJC2YVOTSUDYE7MVTAVCNFSM6AAAAAA7O5PIQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGE3DKNBQGQ . You are receiving this because you authored the thread.Message ID: @.***>

I-NOZex commented 10 months ago

for what I understand, Rollup JS needs those dependencies because it makes native calls with it. I am happy it solved for you too 👍 consider closing this issue thread

webdev408 commented 10 months ago

solved and the issue is closed

mesuhailpm commented 10 months ago

it worked

jamessv commented 10 months ago

based on your architecture download and install Microsoft Visual C++ Redistributable latest supported downloads from here https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

faizaniiiking commented 9 months ago

the download link it's really working but don't know why

jamessv commented 9 months ago

the download link it's really working but don't know why

Your msg is not clear, you want to say link is not working?