Node.js error - return process.dlopen(module, path._makeLong(filename));
Asked Answered
C

5

12

Getting below error for return process.dlopen(module, path._makeLong(filename))

module.js:597
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The specified procedure could not be found.
\\?\C:\SLIM_WORKSPACE\slim\slim-web\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64\binding.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\SLIM_WORKSPACE\slim\slim-web\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:211:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
Closeup answered 25/9, 2017 at 6:8 Comment(2)
I am using windows machine and I have installed required Visual C++ libraries. I applied npm update. but did not worked.Closeup
I used npm rebuild now, but problem still exists.Closeup
M
32

I know am a bit late but this worked for me.

Issue these commands to help you remove/delete your project modules and then update them

$rm -rf node_modules/
$npm update
Macswan answered 2/11, 2017 at 12:24 Comment(3)
Unfortunately this hasn't fixed my issueTiffanytiffi
You cannot just update the dependencies version in an organisation. It is better to ask for the correct npm and node version your peers are using to work on the same project. Then remove the node_modules and package-lock.json and run npm install.Cheiron
Tried repeatedly. Did not solve the problem.Recondite
J
1

You only need to update your node and npm packages in the latest version.

$nvm install --lts    // For install Node latest version 
$npm update          // For update all NPM packages in latest version

$nvm alias default **versionName** // For steup node default version of your PC or server```
Jugal answered 3/3, 2020 at 8:51 Comment(3)
This probably won't fix the issue - the error has something to do with a .dll not being found, a npm update might fix it if it recompiles that certain library. Please note you need nvm to update node with nvm. Also, this question is about 2,5 years old, I'm unsure if this issue is still at play. Lastly: welcome to stack :)Inhesion
This is an npm package issue. These types of errors occurring when an npm package does not work according to the node version. The batter way to solve this, update the node and npm package to the latest version. This will definitely work for everyone. Yes, my answer is too late but it will help other developers who are still facing the same issue.Jugal
Hey Guys, I am seeing this issue. I have tried all the steps above: internal/modules/cjs/loader.js:1025 return process.dlopen(module, path.toNamespacedPath(filename)); ^ Error: Module did not self-register. at Object.Module._extensions..node (internal/modules/cjs/loader.js:1025:18)Liliuokalani
U
1

Delete node_modules folder and reinstall dependencies as administrator with npm install

Ultimatum answered 16/4, 2021 at 16:3 Comment(0)
H
0
  1. You can try installing Microsoft Visual C++ 2015 Redistributable (x64) download here https://aka.ms/vs/17/release/vc_redist.x64.exe

  2. Remove the node modules directory

  3. Remove package-lock.json file;

  4. npm cache verify;

  5. npm install (try restarting your machine if npm install doesn't work for you and enter npm install again).

Hamblin answered 24/11, 2023 at 12:31 Comment(0)
T
0

Yes, Delete Node Modules and again install it by using NPM or Yarn.

npm install 
Thomasinethomason answered 16/1 at 11:37 Comment(1)
Thank you for repeating 3/3 of the answers that already exist.Suksukarno

© 2022 - 2024 — McMap. All rights reserved.