-->

IoTP boilerplate Node RED complains about unsuppor

2019-09-19 19:14发布

问题:

I opened my Node RED flow editor from an existing instance of the Watson IoTP and saw a warning about unsupported version of Node.js.

"Using an unsupported version of Node.js

You should upgrade to the latest Node.js LTS release"

How do I fix this ?

回答1:

When a boilerplate application is created, it is a snapshot of the application boilerplate at that time. Unless you maintain it, nothing changes. The warning is indicating that the Node RED version itself has updated (and is now warning about unsupported Node JS runtime), but the runtime has not changed. This is happening because in the package.json you have:

"node-red":"0.x" -which says install the latest 0.x Node Red version.


and


"engines":{

  "node":"0.12.x"
 }

Controls the Node.js runtime version*


"engines":{

    "node":"4.x"

}

You can fix the warning by updating this



回答2:

Edit the package.json file and update the engines to require NodeJS 4.x or better

...
"engines": {
    "node": ">=4.x.x"
}
...