# Problem with multiple context stores

**URL:** <https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955>\
**Category:** General\
**Created:** [29 October 2021 21:02 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955 "2021-10-29T21:02:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [29 October 2021 21:02 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/1 "2021-10-29T21:02:03Z")

</div>

I've updgraded an old version of Node Red to version v2.1.1  
All nodes seem to be working except the Change node does not give the option for using the different context stores.  
When Node Red starts, it also does not show which it will use as the Default store (it does use the correct store though).  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/19a782a2ad40c1bf896d2bfda49f71dd91202a38.jpeg)

When I used the bash script to upgrade Node Red, I specified the option --node14.  
When I try to upgrade again without that option, I get the message "npm does not support Node.js v10.24.1"  
How do I get Node.js upgraded permanently?  
Could this be the problem with the Change node?

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [29 October 2021 21:18 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/2 "2021-10-29T21:18:34Z")

</div>

Not sure what is happening now. I tried upgrading again (using the --node16 option). The upgraded Node Red version is v2.1.3 and the Change node shows the correct options (the startup still doesn't show which is the Default store).

I then tried the upgrade again but without the --node16 option and the upgrade failed with the message "npm does not support Node.js v10.24.1".  
So my first question still stands (how to get the Node.js upgrade to stay), but the Change node issue may be resolved.

---

<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:** [29 October 2021 21:20 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/3 "2021-10-29T21:20:22Z")

</div>

What hardware/OS are you running on?

Show us the full startup log, rather than just a portion of it. Copy/paste the log please rather than screenshot. Use the `</>` button when pasting the log here.

What do these commands show?

```auto
node -v
npm -v
which node
which npm
apt-cache policy nodejs

```

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [29 October 2021 21:34 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/4 "2021-10-29T21:34:54Z")

</div>

@Colin  
Running raspbian buster on a RPi3bp

```auto
Starting as a systemd service.
29 Oct 15:19:38 - [info]
Welcome to Node-RED
===================
29 Oct 15:19:38 - [info] Node-RED version: v2.1.3
29 Oct 15:19:38 - [info] Node.js version: v16.13.0
29 Oct 15:19:38 - [info] Linux 5.10.63-v7+ arm LE
29 Oct 15:19:40 - [info] Loading palette nodes
29 Oct 15:19:48 - [info] Dashboard version 3.0.4 started at /ui
29 Oct 15:19:49 - [warn] ------------------------------------------------------
29 Oct 15:19:49 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
29 Oct 15:19:49 - [warn] ------------------------------------------------------
29 Oct 15:19:49 - [info] Settings file : /home/pi/.node-red/settings.js
29 Oct 15:19:49 - [info] Context store : 'file' [module=localfilesystem]
29 Oct 15:19:49 - [info] Context store : 'memoryOnly' [module=memory]
29 Oct 15:19:50 - [info] User directory : /home/pi/.node-red
29 Oct 15:19:50 - [warn] Projects disabled : editorTheme.projects.enabled=false
29 Oct 15:19:50 - [warn] Flows file name not set. Generating name using hostname.
29 Oct 15:19:50 - [info] Flows file : /home/pi/.node-red/flows_RPi3FT.json
29 Oct 15:19:50 - [info] Server now running at http://127.0.0.1:1880/
29 Oct 15:19:50 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
29 Oct 15:19:50 - [info] Starting flows
29 Oct 15:19:50 - [info] Started flows
29 Oct 15:19:50 - [info] [sqlitedb:b9843e17.14ab7] opened /home/pi/dbs/iot.db ok
29 Oct 15:19:51 - [info] [serialconfig:8f2d096.250ddf8] serial port /dev/ttyS0 opened at 115200 baud 8N1
29 Oct 15:19:51 - [info] [mqtt-broker:ba11a02a.c0ebb] Connected to broker: mqtt://localhost:1883
29 Oct 15:19:51 - [info] [mqtt-broker:6199f5b3.1612fc] Connected to broker: mqtt://rpi3ft:1883
29 Oct 15:25:25 - [info] Stopping modified nodes
29 Oct 15:25:25 - [info] Stopped modified nodes
29 Oct 15:25:25 - [info] Starting modified nodes
29 Oct 15:25:25 - [info] Started modified nodes
^C
pi@RPi3FT:~ $ node -v
v16.13.0
pi@RPi3FT:~ $ npm -v
8.1.0
pi@RPi3FT:~ $ which node
/usr/local/bin/node
pi@RPi3FT:~ $ which npm
/usr/local/bin/npm
pi@RPi3FT:~ $ apt-cache policy node.js
node-jstimezonedetect:
  Installed: (none)
  Candidate: 1.0.6-2
  Version table:
     1.0.6-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-buffer:
  Installed: (none)
  Candidate: 3.0.0-1
  Version table:
     3.0.0-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-localizer:
  Installed: (none)
  Candidate: 0.0.3-1
  Version table:
     0.0.3-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-stable-stringify:
  Installed: (none)
  Candidate: 1.0.1-1
  Version table:
     1.0.1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-schema-traverse:
  Installed: (none)
  Candidate: 0.3.1-1
  Version table:
     0.3.1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jszip-utils:
  Installed: (none)
  Candidate: 0.0.2+dfsg-1
  Version table:
     0.0.2+dfsg-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsv:
  Installed: (none)
  Candidate: 4.0.0+ds1-1
  Version table:
     4.0.0+ds1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonstream:
  Installed: (none)
  Candidate: 1.3.2-1
  Version table:
     1.3.2-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-schema:
  Installed: (none)
  Candidate: 0.2.3-1
  Version table:
     0.2.3-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-js-cookie:
  Installed: (none)
  Candidate: 2.2.0-2
  Version table:
     2.2.0-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsdom:
  Installed: (none)
  Candidate: 0.8.10+dfsg1-1
  Version table:
     0.8.10+dfsg1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsesc:
  Installed: (none)
  Candidate: 2.5.2-1
  Version table:
     2.5.2-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-stringify-safe:
  Installed: (none)
  Candidate: 5.0.1-1
  Version table:
     5.0.1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json3:
  Installed: (none)
  Candidate: 3.3.2-1
  Version table:
     3.3.2-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json5:
  Installed: (none)
  Candidate: 0.5.1-1
  Version table:
     0.5.1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-parse-better-errors:
  Installed: (none)
  Candidate: 1.0.2-2
  Version table:
     1.0.2-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-js-yaml:
  Installed: (none)
  Candidate: 3.11.0+dfsg-1
  Version table:
     3.11.0+dfsg-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jssip:
  Installed: (none)
  Candidate: 0.6.34-5
  Version table:
     0.6.34-5 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-loader:
  Installed: (none)
  Candidate: 0.5.4-1
  Version table:
     0.5.4-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonminify:
  Installed: (none)
  Candidate: 0.4.1+dfsg1-1
  Version table:
     0.4.1+dfsg1-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsprim:
  Installed: (none)
  Candidate: 1.4.0-1
  Version table:
     1.4.0-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonselect:
  Installed: (none)
  Candidate: 0.4.0+dfsg3-1
  Version table:
     0.4.0+dfsg3-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonfile:
  Installed: (none)
  Candidate: 5.0.0-1
  Version table:
     5.0.0-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonparse:
  Installed: (none)
  Candidate: 1.3.1-6
  Version table:
     1.3.1-6 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json2module:
  Installed: (none)
  Candidate: 0.0.3-1
  Version table:
     0.0.3-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jszip:
  Installed: (none)
  Candidate: 3.1.4+dfsg-1+deb10u1
  Version table:
     3.1.4+dfsg-1+deb10u1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonify:
  Installed: (none)
  Candidate: 0.0.0-1
  Version table:
     0.0.0-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jschardet:
  Installed: (none)
  Candidate: 1.6.0+dfsg-3
  Version table:
     1.6.0+dfsg-3 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-js-tokens:
  Installed: (none)
  Candidate: 2.0.0-1
  Version table:
     2.0.0-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-js-beautify:
  Installed: (none)
  Candidate: 1.7.5+dfsg-3
  Version table:
     1.7.5+dfsg-3 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-json-parse-helpfulerror:
  Installed: (none)
  Candidate: 1.0.3-2
  Version table:
     1.0.3-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsbn:
  Installed: (none)
  Candidate: 1.1.0-1
  Version table:
     1.1.0-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
node-jsonld:
  Installed: (none)
  Candidate: 1.5.3-1
  Version table:
     1.5.3-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

```

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [29 October 2021 22:43 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/5 "2021-10-29T22:43:18Z")

</div>

> [@Glake01](#):
>
> the startup still doesn't show which is the Default store

can you also show how you configured the `contextStorage` part in the `settings.js` file ?

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [29 October 2021 22:46 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/6 "2021-10-29T22:46:25Z")

</div>

@UnborN

```auto
    //contextStorage: {
    // default: {
    // module:"localfilesystem"
    // },
    //},
contextStorage: {
        default: "file",
        file: { module: 'localfilesystem', config: { cache:true , flushInterval: 3600} },
        memoryOnly: { module: 'memory' }
},

    // The following property can be used to order the categories in the editor
 

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 October 2021 23:18 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/7 "2021-10-29T23:18:24Z")

</div>

I beleive the contextStorage should be:

```auto
     	contextStorage: {
			default : { module: 'localfilesystem', config: { cache:true , flushInterval: 3600} },
 			memory : { module: "memory" }
     	},

```

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [29 October 2021 23:31 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/8 "2021-10-29T23:31:43Z")

</div>

@zenofmud  
Thanks Paul,  
That works.

```auto
Oct 29 17:22:39 RPi3FT Node-RED[389]: 29 Oct 17:22:39 - [info] Context store : 'default' [module=localfilesystem]
Oct 29 17:22:39 RPi3FT Node-RED[389]: 29 Oct 17:22:39 - [info] Context store : 'memoryOnly' [module=memory]
Oct 29 17:22:39 RPi3FT Node-RED[389]: 29 Oct 17:22:39 - [info] User directory : /home/pi/.node-red

```

Any thoughts on how to make the Node.js version keep from going back to v10.24.1 when I upgrade without the option --node16?  
Or (to paraphrase Steve Jobs) should I just use the --node16 option each time...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 October 2021 06:08 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/10 "2021-10-30T06:08:00Z")

</div>

what does  
`node -v`  
output

---

<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:** [30 October 2021 07:08 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/11 "2021-10-30T07:08:25Z")

</div>

Can you post the install log when you get the error please. It tells you where it is at the end. Something like  
`/var/log/nodered-install.log`

---

<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:** [30 October 2021 09:06 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/12 "2021-10-30T09:06:41Z")

</div>

> [@Glake01](#):
>
> `pi@RPi3FT:~ $ apt-cache policy node.js`

Wrong command

> [@Colin](#):
>
> `apt-cache policy nodejs`

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [30 October 2021 09:12 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/13 "2021-10-30T09:12:41Z")

</div>

> [@zenofmud](#):
>
> I beleive the contextStorage should be...

I use the same format as @Glake01 and it works fine in the current version of node-RED for me.

```auto
contextStorage: {
  default: "memoryOnly",
  memoryOnly: { module: 'memory' },
        file: { module: 'localfilesystem',
                config: {
                        flushInterval: 300
                        },
              },
   },

```

The advantage with this format, is that when selecting a store, it will display both 'memoryOnly' & 'file' as options to select, so it's easy to select the correct store.

![memory](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e72ccd9381b3e8fa9905fdf799b5f1eb67d439e.jpeg)

However, if you look closely at your context settings which you [pasted above](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/6) @Glake01 , you missed a comma after a brace, which may of being causing your problem. ie  
`memoryOnly: { module: 'memory' }` instead of `memoryOnly: { module: 'memory' },`

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [30 October 2021 16:08 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/14 "2021-10-30T16:08:32Z")

</div>

@Paul-Reed - Paul, I like that! Where did you discover that? It's not in the [Context Store API](https://nodered.org/docs/api/context/) documentation (that I see) and it is not shown in the settings.js when it is built. (I just started NR v2.1.3 with no strings.js so it would create it and I could check)

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [30 October 2021 16:36 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/15 "2021-10-30T16:36:02Z")

</div>

@cymplecy

`Node -v` outputs `v16.13.0` after I've updated with the `--node16` option

`Node -v`outputs `-bash: /usr/local/bin/node: No such file or directory` after I try to update without the `--node16` option. Also some of my nodes stop working:

```auto
30 Oct 10:29:38 - [info] Waiting for missing types to be registered:
30 Oct 10:29:38 - [info] - serial-port (provided by npm module node-red-node-serialport)
30 Oct 10:29:38 - [info] - serial out (provided by npm module node-red-node-serialport)
30 Oct 10:29:38 - [info] - serial in (provided by npm module node-red-node-serialport)
30 Oct 10:29:38 - [info] To install any of these missing modules, run:
30 Oct 10:29:38 - [info] npm install <module name>
30 Oct 10:29:38 - [info] in the directory:
30 Oct 10:29:38 - [info] /home/pi/.node-red

```

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [30 October 2021 16:40 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/16 "2021-10-30T16:40:12Z")

</div>

> [@zenofmud](#):
>
> Paul, I like that! Where did you discover that?

It's shown as an example here - [Working with context : Node-RED](https://nodered.org/docs/user-guide/context)

**EDIT** , that reminds me, I've been meaning to change those labels!

![memory](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/b/8b43a39b55f5d8ece92e56300ae2afad390fa5ab.jpeg)

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [30 October 2021 16:46 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/17 "2021-10-30T16:46:38Z")

</div>

> [@Colin](#):
>
> apt-cache policy nodejs

when I've updated without the `--node16` option I get:

```auto
 apt-cache policy nodejs
nodejs:
  Installed: 10.24.1-1nodesource1
  Candidate: 10.24.1-1nodesource1
  Version table:
 *** 10.24.1-1nodesource1 100
        100 /var/lib/dpkg/status
     10.24.0~dfsg-1~deb10u1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

```

After I've updated with the `--node16` option I get:

```auto
 apt-cache policy nodejs
nodejs:
  Installed: 10.24.1-1nodesource1
  Candidate: 10.24.1-1nodesource1
  Version table:
 *** 10.24.1-1nodesource1 100
        100 /var/lib/dpkg/status
     10.24.0~dfsg-1~deb10u1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
pi@RPi3FT:~ $ node -v
v16.13.0

```

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [30 October 2021 16:54 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/18 "2021-10-30T16:54:40Z")

</div>

> [@Colin](#):
>
> Can you post the install log when you get the error please. It tells you where it is at the end. Something like  
> `/var/log/nodered-install.log`

This what the log shows for an upgrade without the `--node16` option:

```auto
Started : Sat Oct 30 10:27:13 MDT 2021
Running for user pi at /home/pi
Found global nodes: :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodered' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Versions: node:v10.24.1 npm:8.1.1
Now install Node-RED
npm WARN npm npm does not support Node.js v10.24.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN EBADENGINE Unsupported engine { package: 'node-red@2.1.3',
npm WARN EBADENGINE required: { node: '>=12' },
npm WARN EBADENGINE current: { node: 'v10.24.1', npm: '8.1.1' } }
npm WARN EBADENGINE Unsupported engine { package: 'fs-extra@10.0.0',
npm WARN EBADENGINE required: { node: '>=12' },
npm WARN EBADENGINE current: { node: 'v10.24.1', npm: '8.1.1' } }
npm WARN EBADENGINE Unsupported engine { package: 'node-red-admin@2.2.1',
npm WARN EBADENGINE required: { node: '>=12' },
npm WARN EBADENGINE current: { node: 'v10.24.1', npm: '8.1.1' } }

added 290 packages in 49s
2.1.3
Now create basic package.json for the user and move any global nodes
Installing extra nodes: node-red-node-pi-gpio@latest node-red-node-random@latest node-red-node-ping@latest node-red-contrib-play-audio@late$
npm WARN npm npm does not support Node.js v10.24.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN EBADENGINE Unsupported engine { package: 'node-red-dashboard@3.1.0',
npm WARN EBADENGINE required: { node: '>=12' },
npm WARN EBADENGINE current: { node: 'v10.24.1', npm: '8.1.1' } }
npm WARN EBADENGINE Unsupported engine { package: 'node-red-node-sqlite@1.0.1',
npm WARN EBADENGINE required: { node: '>=12' },
npm WARN EBADENGINE current: { node: 'v10.24.1', npm: '8.1.1' } }

up to date in 9s
Now add the shortcut and start/stop/log scripts to the menu
Now add systemd script and configure it for pi
ln: failed to create symbolic link '/usr/bin/python': File exists
Now add launcher to top bar, add cpu temp example, make sure ping works
The user `pi' is already a member of `gpio'.
Memory : 1.0G
Started : Sat Oct 30 10:27:13 MDT 2021
Finished: Sat Oct 30 10:28:40 MDT 2021
Already have nodejs v10.24.1
OLD nodejs 10 :
NEW nodejs 16 :
Installing nodejs 16 over 10 .

```

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [30 October 2021 17:07 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/19 "2021-10-30T17:07:00Z")

</div>

@Paul-Reed

> [@Paul-Reed](#):
>
> `memoryOnly: { module: 'memory' }` instead of `memoryOnly: { module: 'memory' },`

Thanks Paul.

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [30 October 2021 17:17 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/20 "2021-10-30T17:17:59Z")

</div>

**Thank you all for your help!**  
The context store is working just fine.

I still get the following when I've upgraded node red using the `--node16` option so I'll do some Linux Googling to see if I can figure out how to replace v10 with v16 permanently.

```auto
pi@RPi3FT:~ $ node -v
v16.13.0
pi@RPi3FT:~ $ apt-cache policy nodejs
nodejs:
  Installed: 10.24.1-1nodesource1
  Candidate: 10.24.1-1nodesource1
  Version table:
 *** 10.24.1-1nodesource1 100
        100 /var/lib/dpkg/status
     10.24.0~dfsg-1~deb10u1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

```

---

<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:** [30 October 2021 20:31 UTC](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955/21 "2021-10-30T20:31:53Z")

</div>

> [@Glake01](#):
>
> ```auto
> pi@RPi3FT:~ $ node -v
> v16.13.0
> pi@RPi3FT:~ $ which node
> /usr/local/bin/node
> 
> ```

That says that `/usr/local/bin/node` is node v16.13.0. I think that this is where the script installs node, which is not where the package manager apt would install it.

> [@Glake01](#):
>
> ```auto
> apt-cache policy nodejs
> nodejs:
> Installed: 10.24.1-1nodesource1
> 
> ```

That says that version 10.24.1 has been installed using `apt`. So you have two versions installed. I don't know whether possibly you installed that after running the script (by running `apt install nodejs` or similar) or whether the script did not uninstall it for some reason.  
The solution, probably, is to uninstall that version  
`sudo apt remove nodejs`  
then try running the script again. I don't know whether you will need the node16 flag or not.

@dceejay I don't know whether you want to look at this and see whether it indicates a deficiency in the script.

[Next page](https://discourse.nodered.org/t/problem-with-multiple-context-stores/52955.md?page=2)
