# Cannot install node max31865 from repository

**URL:** <https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959>\
**Category:** General\
**Created:** [26 April 2023 14:22 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959 "2023-04-26T14:22:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![devifast](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@devifast](https://discourse.nodered.org/u/devifast)\
**Post date:** [26 April 2023 14:22 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/1 "2023-04-26T14:22:30Z")

</div>

Hello. Unable to install node node-red-contrib-pi-max31865 0.9.4 from repository. Any ideas?  
With node version 19 everyting is ok, but now i have version 20.  
Here is the log file. Thanks.

```auto

-----------------------------------------------------------
2023-04-26T13:52:53.847Z Install : node-red-contrib-pi-max31865 0.9.4

2023-04-26T13:52:56.554Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-pi-max31865@0.9.4
2023-04-26T13:52:58.843Z [err] npm
2023-04-26T13:52:58.844Z [err]  
2023-04-26T13:52:58.844Z [err] WARN config production Use `--omit=dev` instead.
2023-04-26T13:53:08.971Z [err] npm
2023-04-26T13:53:08.972Z [err] ERR! code 1
2023-04-26T13:53:08.973Z [err] npm
2023-04-26T13:53:08.974Z [err] ERR! path /mnt/dietpi_userdata/node-red/node_modules/spi-device
2023-04-26T13:53:08.981Z [err] npm ERR!
2023-04-26T13:53:08.982Z [err] command failed
2023-04-26T13:53:08.982Z [err] npm ERR! command
2023-04-26T13:53:08.983Z [err] sh -c node-gyp rebuild
2023-04-26T13:53:08.984Z [err] npm ERR! gyp info it worked if it ends with ok
2023-04-26T13:53:08.984Z [err] npm ERR! gyp info using node-gyp@9.3.1
2023-04-26T13:53:08.984Z [err] npm
2023-04-26T13:53:08.986Z [err] ERR! gyp info using node@20.0.0 | linux | arm64
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn /usr/bin/python3
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args [
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args 'binding.gyp',
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args '-f',
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args 'make',
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args '-I',
2023-04-26T13:53:08.986Z [err] npm ERR! gyp info spawn args '/mnt/dietpi_userdata/node-red/node_modules/spi-device/build/config.gypi',
2023-04-26T13:53:08.986Z [err] npm 
2023-04-26T13:53:08.987Z [err] ERR! gyp info spawn args '-I',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '-I',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.0.0/include/node/common.gypi',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '-Dlibrary=shared_library',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '-Dvisibility=default',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '-Dnode_root_dir=/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.0.0',
2023-04-26T13:53:08.987Z [err] npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
2023-04-26T13:53:08.988Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.0.0/<(target_arch)/node.lib',
2023-04-26T13:53:08.988Z [err] npm
2023-04-26T13:53:08.988Z [err] ERR! gyp info spawn args '-Dmodule_root_dir=/mnt/dietpi_userdata/node-red/node_modules/spi-device',
2023-04-26T13:53:08.988Z [err] npm ERR! gyp info spawn args '-Dnode_engine=v8',
2023-04-26T13:53:08.988Z [err] npm ERR! gyp info spawn args '--depth=.',
2023-04-26T13:53:08.988Z [err] npm ERR! gyp info spawn args '--no-parallel',
2023-04-26T13:53:08.988Z [err] npm 
2023-04-26T13:53:08.989Z [err] ERR! gyp info spawn args '--generator-output',
2023-04-26T13:53:08.989Z [err] npm ERR! gyp info spawn args 'build',
2023-04-26T13:53:08.989Z [err] npm
2023-04-26T13:53:08.989Z [err] ERR! gyp info spawn args '-Goutput_dir=.'
2023-04-26T13:53:08.989Z [err] npm ERR!
2023-04-26T13:53:08.989Z [err] gyp info spawn args ]
2023-04-26T13:53:08.989Z [err] npm ERR! gyp ERR! build error 
2023-04-26T13:53:08.989Z [err] npm
2023-04-26T13:53:08.989Z [err] ERR! gyp ERR! stack Error: not found: make
2023-04-26T13:53:08.989Z [err] npm ERR!
2023-04-26T13:53:08.989Z [err] gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17)
2023-04-26T13:53:08.989Z [err] npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18
2023-04-26T13:53:08.990Z [err] npm ERR! gyp ERR! stack at new Promise (<anonymous>)
2023-04-26T13:53:08.990Z [err] npm 
2023-04-26T13:53:08.990Z [err] ERR! gyp ERR! stack at step (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21)
2023-04-26T13:53:08.990Z [err] npm ERR!
2023-04-26T13:53:08.990Z [err] gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22
2023-04-26T13:53:08.990Z [err] npm ERR! gyp ERR! stack at new Promise (<anonymous>)
2023-04-26T13:53:08.990Z [err] npm ERR! gyp ERR! stack at subStep (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33)
2023-04-26T13:53:08.990Z [err] npm 
2023-04-26T13:53:08.990Z [err] ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22
2023-04-26T13:53:08.990Z [err] npm ERR!
2023-04-26T13:53:08.991Z [err] gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2023-04-26T13:53:08.991Z [err] npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2023-04-26T13:53:08.991Z [err] npm
2023-04-26T13:53:08.991Z [err] ERR! gyp ERR! System Linux 6.1.21-v8+
2023-04-26T13:53:08.991Z [err] npm 
2023-04-26T13:53:08.991Z [err] ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2023-04-26T13:53:08.991Z [err] npm ERR! gyp ERR! cwd /mnt/dietpi_userdata/node-red/node_modules/spi-device
2023-04-26T13:53:08.992Z [err] npm ERR! gyp ERR! node -v v20.0.0
2023-04-26T13:53:08.992Z [err] npm ERR! gyp ERR! node-gyp -v v9.3.1
2023-04-26T13:53:08.992Z [err] npm ERR! gyp ERR! not ok
2023-04-26T13:53:09.006Z [err] 
2023-04-26T13:53:09.008Z [err] npm ERR! A complete log of this run can be found in: /mnt/dietpi_userdata/node-red/.npm/_logs/2023-04-26T13_52_58_733Z-debug-0.log
2023-04-26T13:53:09.052Z rc=1

-----------------------------------------------------------
2023-04-26T14:04:48.051Z Install : node-red-contrib-pi-max31865 0.9.4

2023-04-26T14:04:51.102Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-pi-max31865@0.9.4
2023-04-26T14:04:53.381Z [err] npm
2023-04-26T14:04:53.383Z [err]  
2023-04-26T14:04:53.383Z [err] WARN config production Use `--omit=dev` instead.
2023-04-26T14:05:03.379Z [err] npm
2023-04-26T14:05:03.380Z [err] ERR! code 1
2023-04-26T14:05:03.381Z [err] npm 
2023-04-26T14:05:03.381Z [err] ERR! path
2023-04-26T14:05:03.384Z [err] /mnt/dietpi_userdata/node-red/node_modules/spi-device
2023-04-26T14:05:03.392Z [err] npm ERR!
2023-04-26T14:05:03.393Z [err] command failed
2023-04-26T14:05:03.393Z [err] npm ERR! command sh -c node-gyp rebuild
2023-04-26T14:05:03.394Z [err] npm ERR!
2023-04-26T14:05:03.394Z [err] gyp info it worked if it ends with ok
2023-04-26T14:05:03.394Z [err] npm ERR! gyp info using node-gyp@9.3.1
2023-04-26T14:05:03.394Z [err] npm ERR! gyp info using node@20.0.0 | linux | arm64
2023-04-26T14:05:03.394Z [err] npm
2023-04-26T14:05:03.395Z [err] ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn /usr/bin/python3
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args [
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args 'binding.gyp',
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args '-f',
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args 'make',
2023-04-26T14:05:03.397Z [err] npm
2023-04-26T14:05:03.397Z [err] ERR! gyp info spawn args '-I',
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args '/mnt/dietpi_userdata/node-red/node_modules/spi-device/build/config.gypi',
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args '-I',
2023-04-26T14:05:03.397Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2023-04-26T14:05:03.397Z [err] npm 
2023-04-26T14:05:03.398Z [err] ERR! gyp info spawn args '-I',
2023-04-26T14:05:03.398Z [err] npm ERR! gyp info spawn args '/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.0.0/include/node/common.gypi',
2023-04-26T14:05:03.398Z [err] npm ERR! gyp info spawn args '-Dlibrary=shared_library',
2023-04-26T14:05:03.398Z [err] npm 
2023-04-26T14:05:03.398Z [err] ERR! gyp info spawn args '-Dvisibility=default',
2023-04-26T14:05:03.398Z [err] npm ERR! gyp info spawn args '-Dnode_root_dir=/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.0.0',
2023-04-26T14:05:03.398Z [err] npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.0.0/<(target_arch)/node.lib',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=/mnt/dietpi_userdata/node-red/node_modules/spi-device',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args '-Dnode_engine=v8',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args '--depth=.',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args '--no-parallel',
2023-04-26T14:05:03.399Z [err] npm 
2023-04-26T14:05:03.399Z [err] ERR! gyp info spawn args '--generator-output',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args 'build',
2023-04-26T14:05:03.399Z [err] npm ERR! gyp info spawn args '-Goutput_dir=.'
2023-04-26T14:05:03.399Z [err] npm ERR!
2023-04-26T14:05:03.400Z [err] gyp info spawn args ]
2023-04-26T14:05:03.400Z [err] npm ERR! gyp ERR! build error 
2023-04-26T14:05:03.400Z [err] npm ERR! gyp ERR! stack Error: not found: make
2023-04-26T14:05:03.400Z [err] npm ERR! gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17)
2023-04-26T14:05:03.400Z [err] npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18
2023-04-26T14:05:03.400Z [err] npm ERR! gyp ERR! stack at new Promise (<anonymous>)
2023-04-26T14:05:03.400Z [err] npm 
2023-04-26T14:05:03.400Z [err] ERR! gyp ERR! stack at step (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21)
2023-04-26T14:05:03.400Z [err] npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22
2023-04-26T14:05:03.400Z [err] npm ERR!
2023-04-26T14:05:03.401Z [err] gyp ERR! stack at new Promise (<anonymous>)
2023-04-26T14:05:03.401Z [err] npm ERR! gyp ERR! stack at subStep (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33)
2023-04-26T14:05:03.401Z [err] npm ERR!
2023-04-26T14:05:03.401Z [err] gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22
2023-04-26T14:05:03.401Z [err] npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2023-04-26T14:05:03.401Z [err] npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2023-04-26T14:05:03.401Z [err] npm ERR! gyp ERR! System Linux 6.1.21-v8+
2023-04-26T14:05:03.401Z [err] npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2023-04-26T14:05:03.401Z [err] npm 
2023-04-26T14:05:03.402Z [err] ERR! gyp ERR! cwd /mnt/dietpi_userdata/node-red/node_modules/spi-device
2023-04-26T14:05:03.402Z [err] npm ERR! gyp ERR! node -v v20.0.0
2023-04-26T14:05:03.402Z [err] npm ERR!
2023-04-26T14:05:03.402Z [err] gyp ERR! node-gyp -v v9.3.1
2023-04-26T14:05:03.402Z [err] npm ERR! gyp ERR! not ok
2023-04-26T14:05:03.420Z [err] 
2023-04-26T14:05:03.421Z [err] npm 
2023-04-26T14:05:03.422Z [err] ERR! A complete log of this run can be found in: /mnt/dietpi_userdata/node-red/.npm/_logs/2023-04-26T14_04_53_274Z-debug-0.log
2023-04-26T14:05:03.469Z rc=1

```

---

<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:** [26 April 2023 15:44 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/2 "2023-04-26T15:44:10Z")

</div>

`2023-04-26T13:53:08.989Z [err] ERR! gyp ERR! stack Error: not found: make`

You have not installed the build tools.  
`sudo apt install build-essential`

---

<div class="post-metadata">

**Author:** ![devifast](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@devifast](https://discourse.nodered.org/u/devifast)\
**Post date:** [26 April 2023 15:55 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/3 "2023-04-26T15:55:31Z")

</div>

Thank you very much!!!  
Everything is ok after your intervention, but I can't understand, wasn't this package installed directly with Node red, everything else is installed without a problem?

---

<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:** [26 April 2023 15:58 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/4 "2023-04-26T15:58:34Z")

</div>

The page for getting started on pi (or Debian/Ubuntu) says:

This script will work on any **Debian-based** operating system, including **Ubuntu** and **Diet-Pi**. You may need to run `sudo apt install build-essential git curl` first to ensure npm is able to fetch and build any binary modules it needs to install.

---

<div class="post-metadata">

**Author:** ![devifast](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@devifast](https://discourse.nodered.org/u/devifast)\
**Post date:** [26 April 2023 16:03 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/5 "2023-04-26T16:03:00Z")

</div>

I haven't read it anywhere. Please send me a link. Once again, I express my thanks.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [26 April 2023 16:09 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/6 "2023-04-26T16:09:21Z")

</div>

[Here it is](https://nodered.org/docs/getting-started/raspberrypi) - Look for the Highlighted Yellow Box

---

<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:** [26 April 2023 16:12 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/7 "2023-04-26T16:12:01Z")

</div>

By the way, nodejs 20 is not yet supported. It may work ok for you but you may find problems. If you do then go back to 18.

---

<div class="post-metadata">

**Author:** ![devifast](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@devifast](https://discourse.nodered.org/u/devifast)\
**Post date:** [26 April 2023 16:48 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/8 "2023-04-26T16:48:55Z")

</div>

How do I go back to a previous version?

---

<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:** [26 April 2023 16:55 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/9 "2023-04-26T16:55:14Z")

</div>

Use the script from the link and add on the end  
`--node18`  
with a space before that option.

---

<div class="post-metadata">

**Author:** ![devifast](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@devifast](https://discourse.nodered.org/u/devifast)\
**Post date:** [26 April 2023 16:58 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/10 "2023-04-26T16:58:21Z")

</div>

Thank you.

---

<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:** [10 May 2023 16:58 UTC](https://discourse.nodered.org/t/cannot-install-node-max31865-from-repository/77959/11 "2023-05-10T16:58:49Z")

</div>

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