Comments (16)
Hello CubicleJockey,
which version of "npm" and "node" do you have?
did you use some kind of tool or manager to install Node.js on the Raspi? (nvm or apt-get or something else)
could you please post the content of "/home/pi/GrovePi/Practice/npm-debug.log" on http://pastebin.com/ and also the command that you are using to install the module?
Thank you
from grovepi.
Hey. Thanks for getting back so quickly.
Sorry I am using a gist from github, since I didn't want to make any new accounts today.
But here are my repro steps: https://gist.github.com/CubicleJockey/3149fbd0db260b266b5b
Thank you for your time and effort.
from grovepi.
Okay, got it. I'll be back to you as soon as I understand what's happened on your side :-) stay tuned.
from grovepi.
I was looking through your logs and what seems to be strange is that you are trying to install the module inside your user's folder ("/pi/node_modules", is that the correct Node.js modules path?). Could you try to install the module inside your application's folder OR globally thanks to the "-g" argument? (es: $ npm install -g node-grovepi)
BTW, the error is related to the i2c module, which is a dependency of our module.
I look forward to your reply.
from grovepi.
Okay, I probably got it... looking here kelly/node-i2c#55 seems like we need to update the dependency to fully support the latest Node.js version.
Until we patch it, I suggest you to install i2c separately and then proceed with the installation.
Let me know if this helped you.
Edit: in order to complete the trouble shooting, could you tell me which model of RaspberryPi do you have?
from grovepi.
Hi,
I see a lot of discovery happened before I could get back here today. Thanks for the effort.
Raspberry Pi Model: Pi 2 Model B
I also have a Model B Revision 2.0 Mounting holes, I could load up a fresh Raspian and try there as well.
from grovepi.
as far as I read, it seems that the 0.12.0 version is still only available for the Pi 2 Model (from the official repository) and our package.json contains an older version of the i2c module, which is not compatible with that version of Node.js; that's why you are facing troubles.
As said before, you can try to install the latest version of the i2c module separately and then continue to install the node-grovepi module. If necessary, you can also change your local package.json in order to download the latest version of the i2c module.
Let me know.
Best regards
from grovepi.
@marcellobarile alright so I haven't tested running it yet but this got me to build without error. I am being explicit with steps for others who may find this.
- sudo npm install GrovePi
- sudo npm install i2c -g (currenly version 2.1)
- cd GrovePi/Software/NodeJs/
- sudo nano package.json
- "dependencies": {
"i2c": "0.1.6", <---- change to version 0.2.1 - ctrl + x, and Y to save
- sudo npm install -g
- After installation completes you will see the library listed as:
[email protected] /usr/local/lib/node_modules/node-grovepi
- [email protected]
- [email protected]
[email protected] ([email protected], [email protected], [email protected])
- [email protected]
- [email protected] ([email protected])
- [email protected] ([email protected], [email protected], [email protected], [email protected])
from grovepi.
@marcellobarile after that build I tried to run this script in a folder outside of the GrovePi/Software/NodeJS folder and in it but it says it can't find 'node-grovepi'. As you see from my previous post I did a sudo npm install -g to try and make it global.
(function(){
'use strict';
var grovepi = require('node-grovepi');
grovepi.init({
onInit: function callback(){
grovepi.run([version(callback), light(callback)]);
},
onError: function(error){
console.log(error);
}
});
function version(callback){
grovepi.version(function onVersion(response){
console.log('Version'.concat(response));
callback();
})
};
function light(callback){
var digitalPort = 4;
grovepi.light(digitalPort, function onLight(response){
console.log('Light'.concat(response));
callback();
});
};
})()
After I get this error:
module.js:338
throw err;
^
Error: Cannot find module 'node-grovepi'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /home/pi/grovepi-starterkit-examples/NodeJS/blinkyLed.js:4:16
at Object. (/home/pi/grovepi-starterkit-examples/NodeJS/blinkyLed.js:29:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
I went to double check what npm modules are installed so I ran npm ls.
Result is:
/home/pi
├── UNMET DEPENDENCY npm-debug.log@*
└── [email protected]npm ERR! missing: npm-debug.log@*, required by undefined@undefined
I am guessing that work around isn't quite able to install properly even though it didn't complete after changing the version to 2.1.
NOTE: I am a totally noob to raspberry pi and linux. I am a native .NET, Web technologies dude, so sorry if some of the issues seem obvious.
from grovepi.
Hi @CubicleJockey, could you try to perform a "npm list" inside your Node.js app's folder?
Edit: you did "sudo npm install -g" but did you also add the node-grovepi dependency to your package.json file? It would be nice if I could see your app's folder.
from grovepi.
Hello @CubicleJockey, how is going with your issue? Did you find a way out?
from grovepi.
Hey sorry I got super distracted. My company shipped me over to take over a
coworkers spot who quit suddenly at Microsoft so I have been swamped. No I
haven't quite figured anything out yet but I haven't had time either. I'll
let you know if I do. Thanks.
On Wed, Apr 8, 2015 at 1:41 PM Marcello Barile [email protected]
wrote:
Hello @CubicleJockey https://github.com/CubicleJockey, how is going
with your issue? Did you find a way out?—
Reply to this email directly or view it on GitHub
#86 (comment).
from grovepi.
okay, as last chance, I suggest you to install a previous version of Node (v0.10.25 works fine with the I2C dependant module). You can find all the necessary procedure here: http://raspberryalphaomega.org.uk/2014/06/11/installing-and-using-node-js-on-raspberry-pi/
I'll update the issue as soon as I get better news regarding the 0.12 Node.js version.
Enjoy!
from grovepi.
Awesome. Thank you for your support. Top Notch!
On Wed, Apr 8, 2015 at 3:47 PM Marcello Barile [email protected]
wrote:
okay, as last chance, I suggest you to install a previous version of Node
(v0.10.25 works fine with the I2C dependant module). You can find all the
necessary procedure here:
http://raspberryalphaomega.org.uk/2014/06/11/installing-and-using-node-js-on-raspberry-pi/I'll update the issue as soon as I got better news regarding the 0.12
Node.js version.Enjoy!
—
Reply to this email directly or view it on GitHub
#86 (comment).
from grovepi.
Hi @CubicleJockey , there is a new version of the node-grovepi module and you can find more info here: https://www.npmjs.com/package/node-grovepi
Please, note that it has been refactored and it will break your application if you switch from the v1.* to the v2.* ... on the other hand, it fully supports the latest version of Node.js
Enjoy!
from grovepi.
Thank you for the update. I am excited that the latest version is
available. But now I am conflicted betwee C# with the Win10 IOT on
Raspberry Pi 2 or try and work it out with NodeJS. Ahhh Choices. I may just
have to get multiple memory cards and build anything I build in both. :)
Cheers and thanks for the update.
On Wed, Jun 24, 2015 at 6:50 AM Marcello Barile [email protected]
wrote:
Hi @CubicleJockey https://github.com/CubicleJockey , there is a new
version of the node-grovepi module and you can find more info here:
https://www.npmjs.com/package/node-grovepi
Please, note that it has been refactored and it will break your
application if you switch from the v1.* to the v2.* ... on the other hand,
it fully supports the latest version of Node.jsEnjoy!
—
Reply to this email directly or view it on GitHub
#86 (comment).
from grovepi.
Related Issues (20)
- Installing GrovePi: ./install.sh: command not found HOT 4
- Installing on balena.io or docker HOT 1
- No such file or directory -- bash firmware_update.sh HOT 2
- Home Weather Station -- Runtime Error HOT 5
- The GrovePi sensor connection is unstable!! Under Python. Can you help me?
- Help me!My GrovePi’s RST often light up after hours of work HOT 4
- Grove-LCD RGB Backlight V4.0 can't find i2c address on grovepi
- digitalRead not working HOT 1
- GrovePi+ D4 port question--differences among ports or faulty port/pi?
- Ruby test code doesn't run, i2c-devices library problem? HOT 1
- No more need the buffer tools module
- Can I use Tinker board to connect Grove Pi?
- oops: unable to determine board revision from /proc/cpuinfo
- grove_co2_lib.py not compatible with python3 HOT 1
- Hightemperature not reading
- di_i2c module missing ?
- RFR_Tools: Couldn't add Nodejs repo to source because it's not available for "bullseye" distribution
- Error: "pybind11" must be installed before running the build. HOT 4
- compatible with Banana Pi M2 Berry / M5 or Radxa Rock 3 A / Rock 4 C+ ? HOT 1
- does anyone know how to fix this?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grovepi.