14

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) 
2
  • 1
    I am using windows machine and I have installed required Visual C++ libraries. I applied npm update. but did not worked. Commented Sep 25, 2017 at 6:10
  • 1
    I used npm rebuild now, but problem still exists. Commented Sep 25, 2017 at 6:42

6 Answers 6

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 
Sign up to request clarification or add additional context in comments.

3 Comments

Unfortunately this hasn't fixed my issue
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.
Tried repeatedly. Did not solve the problem.
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``` 

3 Comments

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 :)
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.
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)
1

Delete node_modules folder and reinstall dependencies as administrator with npm install

Comments

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).

Comments

0

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

npm install 

1 Comment

Thank you for repeating 3/3 of the answers that already exist.
0

In a case of directus. When you started node js app using pm2. You have to do the following:

cd {{folder of directus app}} rm -rf node_modules rm package_lock.json npm i pm2 delete {{process_name}} pm2 start npx --name "{{process_name}}" -- directus start 

Comments