# Code ENOLOCAL Error when installing Node: mpu9250

**URL:** https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066
**Category:** General
**Created:** [17 November 2020 13:59 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066 "2020-11-17T13:59:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![andrea](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrea](https://discourse.nodered.org/u/andrea)
#### Post date: [17 November 2020 13:59 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/1 "2020-11-17T13:59:06Z")

</div>

Hi,  
Only when I try to install this module, I get this error: there is a simple explanation (Never had something like it):

pi@raspberrypi:~/.node-red $ npm install /path/to/node-red-contrib-mpu9250  
npm ERR! code ENOLOCAL  
npm ERR! Could not install from "../../../path/to/node-red-contrib-mpu9250" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:  
npm ERR! /home/pi/.npm/\_logs/2020-11-17T13\_49\_19\_131Z-debug.log

Thanks for your experties.  
Andrea

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [17 November 2020 14:21 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/2 "2020-11-17T14:21:08Z")

</div>

The error seems quite clear, that folder does not contain a file package.json

Why are you attempting to install from a folder rather than from npm?

---

<div class="post-metadata">

### Author: ![andrea](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrea](https://discourse.nodered.org/u/andrea)
#### Post date: [17 November 2020 14:41 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/3 "2020-11-17T14:41:04Z")

</div>

## I tried to do the installation from Node-Red :Manage Palette with the following result:

2020-11-17T13:47:14.523Z Install : node-red-contrib-mpu9250 2.0.2

2020-11-17T13:47:14.541Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-mpu9250@2.0.2  
2020-11-17T13:47:25.042Z [err] npm  
2020-11-17T13:47:25.043Z [err] WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)  
2020-11-17T13:47:28.263Z [out]  
2020-11-17T13:47:28.263Z [out] \> sleep@3.0.0 install /home/pi/.node-red/node\_modules/sleep  
2020-11-17T13:47:28.263Z [out] \> node-gyp rebuild  
2020-11-17T13:47:28.263Z [out]  
2020-11-17T13:47:30.873Z [out] make: Entering directory '/home/pi/.node-red/node\_modules/sleep/build'  
2020-11-17T13:47:30.882Z [out] CXX(target) Release/obj.target/node\_sleep/sleep.o  
2020-11-17T13:47:33.925Z [err] ../sleep.cc:6:11: error: ‘v8::Handle’ has not been declared  
2020-11-17T13:47:33.925Z [err] using v8::Handle;  
2020-11-17T13:47:33.925Z [err] ^ ~~~~~  
2020-11-17T13:47:33.925Z [err] ../sleep.cc: In function ‘Nan::NAN\_METHOD\_RETURN\_TYPE Sleep(Nan::NAN\_METHOD\_ARGS\_TYPE)’:  
2020-11-17T13:47:33.925Z [err] ../sleep.cc:42:30: error: no matching function for call to ‘v8::Value::Uint32Value()’  
2020-11-17T13:47:33.925Z [err] sleep(info[0]-\>Uint32Value());  
2020-11-17T13:47:33.925Z [err] ^  
2020-11-17T13:47:33.925Z [err] In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,  
2020-11-17T13:47:33.925Z [err] from ../../nan/nan.h:56,  
2020-11-17T13:47:33.925Z [err] from ../sleep.cc:2:  
2020-11-17T13:47:33.925Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Localv8::Context) const’  
2020-11-17T13:47:33.925Z [err] V8\_WARN\_UNUSED\_RESULT Maybe\<uint32\_t\> Uint32Value(  
2020-11-17T13:47:33.925Z [err] ^ ~~~~~~~~~~  
2020-11-17T13:47:33.925Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided  
2020-11-17T13:47:33.925Z [err] ../sleep.cc: In function ‘Nan::NAN\_METHOD\_RETURN\_TYPE USleep(Nan::NAN\_METHOD\_ARGS\_TYPE)’:  
2020-11-17T13:47:33.925Z [err] ../sleep.cc:54:31: error: no matching function for call to ‘v8::Value::Uint32Value()’  
2020-11-17T13:47:33.925Z [err] usleep(info[0]-\>Uint32Value());  
2020-11-17T13:47:33.925Z [err] ^  
2020-11-17T13:47:33.925Z [err] In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,  
2020-11-17T13:47:33.925Z [err] from ../../nan/nan.h:56,  
2020-11-17T13:47:33.925Z [err] from ../sleep.cc:2:  
2020-11-17T13:47:33.925Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe v8::Value::Uint32Value(v8::Localv8::Context) const’  
2020-11-17T13:47:33.925Z [err] V8\_WARN\_UNUSED\_RESULT Maybe\<uint32\_t\> Uint32Value(  
2020-11-17T13:47:33.925Z [err] ^ ~~~~~~~~~~  
2020-11-17T13:47:33.925Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided  
2020-11-17T13:47:33.925Z [err] ../sleep.cc: In function ‘void init(Nan::ADDON\_REGISTER\_FUNCTION\_ARGS\_TYPE)’:  
2020-11-17T13:47:33.925Z [err] ../sleep.cc:62:52: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’  
2020-11-17T13:47:33.925Z [err] Nan::New(Sleep)-\>GetFunction());  
2020-11-17T13:47:33.925Z [err] ^  
2020-11-17T13:47:33.926Z [err] In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,  
2020-11-17T13:47:33.926Z [err] from ../../nan/nan.h:56,  
2020-11-17T13:47:33.926Z [err] from ../sleep.cc:2:  
2020-11-17T13:47:33.926Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)’  
2020-11-17T13:47:33.926Z [err] V8\_WARN\_UNUSED\_RESULT MaybeLocal GetFunction(  
2020-11-17T13:47:33.926Z [err] ^ ~~~~~~~~~~  
2020-11-17T13:47:33.926Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided  
2020-11-17T13:47:33.927Z [err] ../sleep.cc:64:53: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’  
2020-11-17T13:47:33.927Z [err] Nan::New(USleep)-\>GetFunction());  
2020-11-17T13:47:33.927Z [err] ^  
2020-11-17T13:47:33.927Z [err] In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,  
2020-11-17T13:47:33.927Z [err] from ../../nan/nan.h:56,  
2020-11-17T13:47:33.927Z [err] from ../sleep.cc:2:  
2020-11-17T13:47:33.927Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)’  
2020-11-17T13:47:33.927Z [err] V8\_WARN\_UNUSED\_RESULT MaybeLocal GetFunction(  
2020-11-17T13:47:33.927Z [err] ^ ~~~~~~~~~~  
2020-11-17T13:47:33.927Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided  
2020-11-17T13:47:33.928Z [err] In file included from ../../nan/nan.h:56,  
2020-11-17T13:47:33.928Z [err] from ../sleep.cc:2:  
2020-11-17T13:47:33.928Z [err] ../sleep.cc: At global scope:  
2020-11-17T13:47:33.928Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:727:43: warning: cast between incompatible function types from ‘void (_)(Nan::ADDON\_REGISTER\_FUNCTION\_ARGS\_TYPE)’ {aka ‘void (_)(v8::Localv8::Object)’} to ‘node::addon\_register\_func’ {aka ‘void (_)(v8::Localv8::Object, v8::Localv8::Value, void_)’} [-Wcast-function-type]  
2020-11-17T13:47:33.928Z [err] (node::addon\_register\_func) (regfunc),   
2020-11-17T13:47:33.928Z [err] ^  
2020-11-17T13:47:33.928Z [err] /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:761:3: note: in expansion of macro ‘NODE\_MODULE\_X’  
2020-11-17T13:47:33.928Z [err] NODE\_MODULE\_X(modname, regfunc, NULL, 0) // NOLINT (readability/null\_usage)  
2020-11-17T13:47:33.928Z [err] ^ ~~~~~~~~~~~~  
2020-11-17T13:47:33.928Z [err] ../sleep.cc:68:1: note: in expansion of macro ‘NODE\_MODULE’  
2020-11-17T13:47:33.928Z [err] NODE\_MODULE(node\_sleep, init)  
2020-11-17T13:47:33.928Z [err] ^ ~~~~~~~~~~  
2020-11-17T13:47:34.268Z [err] make: \*\*\* [node\_sleep.target.mk:109: Release/obj.target/node\_sleep/sleep.o] Error 1  
2020-11-17T13:47:34.268Z [out] make: Leaving directory '/home/pi/.node-red/node\_modules/sleep/build'  
2020-11-17T13:47:34.271Z [err] gyp  
2020-11-17T13:47:34.272Z [err]  
2020-11-17T13:47:34.272Z [err] ERR! build error  
2020-11-17T13:47:34.274Z [err] gyp  
2020-11-17T13:47:34.274Z [err] ERR! stack Error: `make` failed with exit code: 2  
2020-11-17T13:47:34.274Z [err] gyp  
2020-11-17T13:47:34.274Z [err] ERR! stack at ChildProcess.onExit (/usr/lib/node\_modules/npm/node\_modules/node-gyp/lib/build.js:194:23)  
2020-11-17T13:47:34.274Z [err] gyp  
2020-11-17T13:47:34.274Z [err] ERR! stack at ChildProcess.emit (events.js:314:20)  
2020-11-17T13:47:34.274Z [err] gyp  
2020-11-17T13:47:34.274Z [err] ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:275:12)  
2020-11-17T13:47:34.275Z [err] gyp  
2020-11-17T13:47:34.275Z [err] ERR! System Linux 5.4.72-v7l+  
2020-11-17T13:47:34.275Z [err] gyp  
2020-11-17T13:47:34.276Z [err] ERR! command "/usr/bin/node" "/usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "rebuild"  
2020-11-17T13:47:34.276Z [err] gyp ERR!  
2020-11-17T13:47:34.276Z [err] cwd /home/pi/.node-red/node\_modules/sleep  
2020-11-17T13:47:34.276Z [err] gyp  
2020-11-17T13:47:34.276Z [err] ERR! node -v v12.19.0  
2020-11-17T13:47:34.276Z [err] gyp ERR!  
2020-11-17T13:47:34.276Z [err] node-gyp -v v5.1.0  
2020-11-17T13:47:34.276Z [err] gyp ERR! not ok  
2020-11-17T13:47:34.916Z [err] npm ERR! code ELIFECYCLE  
2020-11-17T13:47:34.916Z [err] npm ERR! errno 1  
2020-11-17T13:47:34.935Z [err] npm ERR! sleep@3.0.0 install: `node-gyp rebuild`  
2020-11-17T13:47:34.935Z [err] npm ERR! Exit status 1  
2020-11-17T13:47:34.935Z [err] npm ERR!  
2020-11-17T13:47:34.935Z [err] npm ERR! Failed at the sleep@3.0.0 install script.  
2020-11-17T13:47:34.935Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.  
2020-11-17T13:47:34.953Z [err]  
2020-11-17T13:47:34.954Z [err] npm  
2020-11-17T13:47:34.964Z [err] ERR! A complete log of this run can be found in:  
2020-11-17T13:47:34.964Z [err] npm ERR! /home/pi/.npm/\_logs/2020-11-17T13\_47\_34\_940Z-debug.log  
2020-11-17T13:47:34.983Z rc=1:

---

<div class="post-metadata">

### Author: ![andrea](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrea](https://discourse.nodered.org/u/andrea)
#### Post date: [17 November 2020 14:43 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/4 "2020-11-17T14:43:28Z")

</div>

and following the instruction row after row on the "node-red-contrib-mpu9250" it self....  
thats what I was asked to do......

```auto
cd ~/.node-red
npm install /path/to/node-red-contrib-mpu9250

```

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [17 November 2020 15:58 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/5 "2020-11-17T15:58:05Z")

</div>

I suspect the node is not compatible with nodejs 12 which you have (or 14 which I have). You should submit an issue on the nodes [gitlab page](https://gitlab.com/benoit.lavorata/node-red-contrib-mpu9250/-/issues) and hope the author responds promptly. In the meantime you could downgrade your system to nodejs 8 or 10 I suppose, but it might be a trivial fix so probably worth submitting the issue and waiting for 24 hours to see what happens.

> [@andrea](#):
>
> following the instruction row after row on the "node-red-contrib-mpu9250" it self....  
> thats what I was asked to do

Those are instructions on how to install if you have downloaded the source onto your system. Where is says `path/to/` you are supposed to put the path to folder which you downloaded it to. Which you haven't and you don't need to.

---

<div class="post-metadata">

### Author: ![andrea](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrea](https://discourse.nodered.org/u/andrea)
#### Post date: [17 November 2020 16:17 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/6 "2020-11-17T16:17:45Z")

</div>

Thanks Colin for your prompt respond. I will folllow your advice.  
Yes, I tried to change the "path/to" with no better results

I am trying to read a GY-91 sensor connected to my RPI4, do you know of any other module able to use this sensor?

Thanks again.  
Regards Andrea

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [17 November 2020 21:32 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/7 "2020-11-17T21:32:58Z")

</div>

> [@andrea](#):
>
> I tried to change the "path/to" with no better results

As I said, that would only work if you had downloaded the node's source first, and if it won't build installing from node-red then it won't install directly from source either. It needs to be fixed.

I don't know anything about that sensor, sorry.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 January 2021 21:32 UTC](https://discourse.nodered.org/t/code-enolocal-error-when-installing-node-mpu9250/36066/8 "2021-01-16T21:32:59Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
