Error during a break: the module was not registered independently

I am trying to use node-vlc with nw.js (v0.12.0-alpha2). When I launch my application without nw.js, it works, but when I launch it with nw.js, I received an error message:

Fault Error: the module did not register on its own. ", source: / home / alexis / Bureau / dev / jukebox / node_modules / vlc / node_modules / ffi / node_modules / bindings / bindings.js (84)

I tried some commands with nw-gyp, but that could not help me. I'm on Ubuntu 14, 64-bit.

+74
javascript node-webkit node-ffi
Feb 12 '15 at 20:13
source share
11 answers

If you updated node, then npm rebuild can fix this for you

+136
Mar 04 '15 at 16:29
source share

For me: rm -r node_modules then npm install

+37
Jul 01 '15 at 12:20
source share

I had a similar problem with another product, and I decided to change the version of node I used. I used 0.12.0 and returned to 0.10.26 .

Personally, I use NVM to handle the node version. Using NVM, it was just like starting

 nvm use 0.10.26 

Or set the default version to 0.10.26

 nvm alias default 0.10.26 

I hope this helps you - our problems came from different products, but the solution may be the same.

+12
Feb 17 '15 at 23:06
source share

I had a similar problem.

/Users/user/NodeAddons/bridge/node_modules/bindings/bindings.js:83 Error: the module did not register itself.

In my case, I was doing the C / C ++ add-in, and I forgot to export the add-in, the code below was missing in my main.cc:

 void Init(v8::Handle<v8::Object> exports) { NODE_SET_METHOD(exports, "method", method); } NODE_MODULE(method, Init); 

Hope this helps others! Thank:)

+4
Dec 22 '16 at 13:03
source share

npm update works for me

+3
Mar 23 '15 at 16:28
source share

I had the same problem with 0.12 and io.js 1.3.0, returning to Node.js 0.10, fixed the problem.

+1
Feb 24 '15 at 12:30
source share

I will add the same problem because I installed in the modules as sudo ... Removing the node modules folder and reinstalling as a regular user fixed.

+1
May 14 '15 at 9:17
source share

For me, npm rebuild or npm update does not work. I had to delete the node_modules folder and run npm install to install them again.

+1
May 22 '15 at 16:10
source share

Mac:

For me below actions work: node v0.12.2

 npm rebuild rm -rf node_modules npm i 
+1
Jun 07 '15 at 3:54 on
source share

i also ran into the same problem, and this work worked for me.

you need to go into node_module / and configure nw-gyp target by running the command

 $ nw-gyp configure --target=0.12.3 

then

 $ nw-gyp build 

and it worked for me. If the nw-gyp command is not found, use

 npm install nw-gyp 
0
Sep 04 '15 at 8:39
source share

I once had this problem when creating a C ++ multi-domain addon. In my binding.gyp file, I had:

 "sources": ["src/*.cc", "src/*.h" ] 

And my project contained several * .cc files. However, the NODE_MODULE () macro was called in only one file, which imported the rest of the files. But node expects it to be called in the frist * .cc file specified in the sources. So I had to change the sources to explicitly add this file to the beginning

0
Oct 25 '17 at 15:09 on
source share



All Articles