Question: I want to describe a network graph of vertices and edges with JSON Schema.

An example JSON could look like this:

```json
{
  "V": [
    "1",
    "2",
    "3"
  ],
  "E": [
    {
      "v1": "1",
      "v2": "2"
    },
    {
      "v1": "2",
      "v2": "3"
    }
  ]
}

```

I have a set of 3 vertices and 2 edges to connect them. I want all vertices to have an arbitrary string identifier, so it could also be "node1" or "panda". However, is there a way to validate that the endpoints of my edges only point to existing vertices?

I.e.: Should NOT pass:

```json
{
  "V": [
    "n1",
    "n2",
    "n3"
  ],
  "E": [
    {
      "v1": "n1",
      "v2": "IdThatDoesNotExistAbove"
    }
  ]
}

```

I looked at ENUMs, however, I struggle to have them point at data from a JSON that I want to validate rather than to the specification itself.

Answer: 
Your Node version is scoped to 12.22.12 per your screenshot. If you need to use that version you could look at something like [NVM](https://github.com/nvm-sh/nvm):

Install
-------

```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

```

Set profile
-----------

add this to your profile file

```
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

```

Use
---

set to use Node version with:

```
nvm use 18.12.1

```

Or if you dont need 12.22.12 you can set the default Node version 18 with:

```
nvm alias default 18.12.1

```
you probably have multiple nodejs version in your PC and environment variable points to version 12 not the latest

> 
> To create or modify environment variables on Windows 10:
> 
> 
> On the Windows taskbar, right-click the Windows icon and select
> System.
> 
> 
> In the Settings window, under Related Settings, click Advanced system
> settings.
> 
> 
> Figure 7-1 Advanced System Settings in Windows
> 
> 
> Description of Figure 7-1 follows Description of "Figure 7-1 Advanced
> System Settings in Windows" On the Advanced tab, click Environment
> Variables.
> 
> 
> Figure 7-2 Environment Variables Dialog in Windows [enviroment variable window](https://i.stack.imgur.com/xoo8h.gif)
> 
> 
> Description of Figure 7-2 follows Description of "Figure 7-2
> Environment Variables Dialog in Windows" Click New to create a new
> environment variable. Click Edit to modify an existing environment
> variable.
> 
> 
> After creating or modifying the environment variable, click Apply and
> then OK to have the change take effect.
> 
> 
> 

try to find the env variable for nodejs ( most likely included in Path Variable ) and figure out to which versions it points to if not latest change it

[node js env variable path - location](https://i.stack.imgur.com/UCfNK.png)

---

You might consider using nvm to manage multiple nodejs version.