The entire settings file is the default settings file produced by node-red with the addition of
//COMMENT TEST HERE
adminAuth: require("./node_modules/node-red-contrib-okta/user-authentication")({
oktaAPIToken: process.env.OKTA_TOKEN,
oktaAPIUrl: process.env.OKTA_URL, //Okta API url
groups: [
{
groupID: process.env.OKTA_GROUP_ID, //okta group DD
permissions: '*'
}
]
}),
When I include this code, I get this error
docker-node-red-web-1 | 2022-06-07T20:24:24: PM2 log: App [node-red:0] exited with code [0] via signal [SIGINT]
docker-node-red-web-1 | 2022-06-07T20:24:24: PM2 log: App [node-red:0] starting in -fork mode-
docker-node-red-web-1 | 2022-06-07T20:24:24: PM2 log: App [node-red:0] online
when I do not include it, everything works smoothly, what is going wrong?
I can include the authentication code if it helps anyone responding, but I doubt it’s really the route of the issue.
Thanks
2
Answers
The solution ended up being the location of certain directories!
A Little bit hard to explain over text, but there had to be some stuff shuffled around.
There isn’t enough information in the question to answer this.
The
settings.js
needs to be a properly formatted JavaScript source file. The easiest way to test this is to manually load the settings file in nodejs.Assuming you have a local directory mounted as
/data
which contains thesettings.js
file, do the followingnode
require('./settings.js')
and press enterThis should give you a exact error message for what is wrong with your
settings.js
file