(Node )Error: Module did not self-register - node.js

Getting this error while lifting the serve: sails lift
Error: Module did not self-register.
at Error (native)
at Object.Module._extensions..node (module.js:440:18)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)

Related

Error wickrio_addon.node is not a valid Win32 application

I've been to trying to get my hands off this by reinstalling node.js but keeps giving me same issues.
Error: \\?\C:\Users\iSel Media\Desktop\wickrio_web_interface-master\node_modules\wickrio_addon\wickrio_addon.node is not a valid Win32 application.
\\?\C:\Users\iSel Media\Desktop\wickrio_web_interface-master\node_modules\wickrio_addon\wickrio_addon.node
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1187:18)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\iSel Media\Desktop\wickrio_web_interface-master\node_modules\wickrio-bot-api\src\WickrIOBot.js:1:20)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
code: 'ERR_DLOPEN_FAILED'
}

update npm on windows 7

After I use this trick I successfully updated current node version to v16.6.2 on win7x64, but now npm -v throws errors:
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\socks-proxy-agent\dist\agent.js:114:44)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\socks-proxy-agent\dist\index.js:5:33)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\make-fetch-happen\lib\agent.js:161:25)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\socks-proxy-agent\dist\agent.js:114:44)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\socks-proxy-agent\dist\index.js:5:33)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\make-fetch-happen\lib\agent.js:161:25)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
is there way to fix it? And I have not enough reputation ask about it that branch.
I installed nvm, configured system environment variables and update my node version to latest by command nvm install latest

Why nodejs error? It's Error 583. How do I fix the fever?

It's an error. Follow the usual method. I want to know how to fix I tried to delete it again and still not missing this error.
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'mysql'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:\work\test.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'mysql'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:\work\test.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Error: Cannot find module '../build/Release/kerberos' on ubuntu in a nodejs project

Error: Cannot find module '../build/Release/kerberos'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/mnt/c/Repo/firm-datahub-api/node_modules/authenticate-uxtf/node_modules/kerberos/lib/kerberos.js:1:16)
at Module._compile (module.js:653:30)
at Module._compile (/mnt/c/Repo/firm-datahub-api/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (module.js:664:10)
at Object.newLoader [as .js] (/mnt/c/Repo/firm-datahub-api/node_modules/pirates/lib/index.js:88:7)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/mnt/c/Repo/firm-datahub-api/node_modules/authenticate-uxtf/node_modules/kerberos/index.js:2:18)
at Module._compile (module.js:653:30)
at Module._compile (/mnt/c/Repo/firm-datahub-api/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (module.js:664:10)
at Object.newLoader [as .js] (/mnt/c/Repo/firm-datahub-api/node_modules/pirates/lib/index.js:88:7)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
I tried every available solution but getting same result.
I installed, kerberos server, client, workstation, what am I missing?

rawmemchr: symbol not found in nodegit with docker

When I run the server in the Docker container, everything works fine until I include the line nodegit = require 'nodegit'. If NodeGit is required, on docker-compose up I get the following error:
Error: Error relocating
/usr/myContainer/node_modules/nodegit/build/Release/nodegit.node:
__rawmemchr: symbol not found
I tried NodeGit v.0.12.1 (the latest version) and v.0.11.0.
Without Docker, NodeGit works fine in the same project.
I am new to Docker and virtual machines generally. Any advice on how to troubleshoot this would really help. Thanks!
Update: here are the logs of my container:
[00:22:03] Requiring external module coffee-script/register
[00:22:04] Using gulpfile /usr/lada/gulpfile.coffee
[00:22:04] Starting 'lada-up'...
[00:22:04] Finished 'lada-up' after 23 ms
livereload[tiny-lr] listening on 35729 ...
Error: Error relocating /usr/lada/node_modules/nodegit/build/Release/nodegit.node: __rawmemchr: symbol not found
at Error (native)
at Object.Module._extensions..node (module.js:440:18)
at Module.load (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/lada/node_modules/nodegit/lib/nodegit.js:9:12)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/lada/app/post.coffee:1:11)
at Object.<anonymous> (/usr/lada/app/post.coffee:1:1)
at Module._compile (module.js:413:34)
at Object.loadFile (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
at Module.load (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/lada/app/index.coffee:8:6)
at Object.<anonymous> (/usr/lada/app/index.coffee:1:1)
at Module._compile (module.js:413:34)
at Object.exports.run (/usr/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:134:23)
at compileScript (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:224:29)
at compilePath (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:174:14)
at Object.exports.run (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:98:20)
at Object.<anonymous> (/usr/lib/node_modules/coffee-script/bin/coffee:7:41)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:142:18)
at node.js:939:3

Resources