Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install #6

Closed
gizbo opened this issue Jul 17, 2020 · 10 comments
Closed

Unable to install #6

gizbo opened this issue Jul 17, 2020 · 10 comments

Comments

@gizbo
Copy link

gizbo commented Jul 17, 2020

Hi,
Trying to use this library and I'm getting the following error:
...
../src/addon.cpp:217:32: error: no matching function for call to ‘v8::Value::Int32Value()’
usleep(info[0]->Int32Value() * 1000);
...
make: *** [rpi-ws281x.target.mk:120: Release/obj.target/rpi-ws281x/src/addon.o] Error 1
make: Leaving directory '/home/pi/code/robotpi/api/node_modules/rpi-ws281x/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.97-v7+
gyp ERR! command "/home/pi/.nvm/versions/node/v12.18.2/bin/node" "/home/pi/.nvm/versions/node/v12.18.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/code/robotpi/api/node_modules/rpi-ws281x
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN server@1.0.0 No description
npm WARN server@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rpi-ws281x@1.0.33 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rpi-ws281x@1.0.33 install script.

Any ideas?
Thanks so much

@meg768
Copy link
Owner

meg768 commented Jul 17, 2020

I might be some changes in the V8 engine. This module was designed using Node version 11.5.0. You seem to be using 12.18.2.

@meg768
Copy link
Owner

meg768 commented Jul 17, 2020

Are you using a node version manager?

@gizbo
Copy link
Author

gizbo commented Jul 17, 2020

Hi,
Thanks for the quick response. I've switch to version 11.5.0 and now I'm getting the following :(
internal/modules/cjs/loader.js:1251
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The module '/home/pi/code/robotpi/api/node_modules/rpi-ws281x/build/Release/rpi-ws281x.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 67. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1251:18)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object. (/home/pi/code/robotpi/api/node_modules/rpi-ws281x/index.js:2:13)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)

@meg768
Copy link
Owner

meg768 commented Jul 17, 2020

Remove the node_modules directory and try again.

@gizbo
Copy link
Author

gizbo commented Jul 17, 2020

Are you using a node version manager?

Yes I am using nvm.

@meg768
Copy link
Owner

meg768 commented Jul 17, 2020

When changing node versions it is best to remove the node_modules directory entirely. It may be partially compiled with the previous version of node.

@meg768
Copy link
Owner

meg768 commented Jul 18, 2020

Resolved? May I close this issue? Of course, will have to look into node version 12 and up...

@gizbo
Copy link
Author

gizbo commented Jul 18, 2020

Resolved? May I close this issue? Of course, will have to look into node version 12 and up...

Well no I didn't managed to get it working/install. Perhaps a problem with my environment, I will try from a clean slate, maybe then. If you could share me your setup, I could try again.

Thanks so much for help,

@fusionstream
Copy link

Installing 11.15.0 fixed it for me. I had to use the unofficial builds to download a tar and manually copy the executables because I'm using a pi zero

@fusionstream
Copy link

And just a reminder. The default GPIO18 is pin12 on pi zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants