Projects on v0.18.2 - "Error loading settings file: /data/settings.js"

817 views
Skip to first unread message

Jéan Roux

unread,
Feb 12, 2018, 5:59:09 PM2/12/18
to Node-RED
Hi Nick, 

My first attempt at Projects. Added to settings.js as per instructions, did it just below the LAST close bracket of the file.

   editorTheme: {
       projects: {
           enabled: true
       }
   }

But now I get the error below:

Error loading settings file: /data/settings.js

/data/settings.js:238

    editorTheme: {

    ^^^^^^^^^^^


SyntaxError: Unexpected identifier

    at new Script (vm.js:51:7)

    at createScript (vm.js:138:10)

    at Object.runInThisContext (vm.js:199:10)

    at Module._compile (module.js:624:28)

    at Object.Module._extensions..js (module.js:671:10)

    at Module.load (module.js:573:32)

    at tryModuleLoad (module.js:513:12)

    at Function.Module._load (module.js:505:3)

    at Module.require (module.js:604:17)

    at require (internal/module.js:11:18)



I assume the addition to settings.js is wrong? But not sure how to change it, just before the last } is for sure the bracket of:

module.exports = {

Nick O'Leary

unread,
Feb 12, 2018, 6:01:05 PM2/12/18
to Node-RED Mailing List
It needs to be *inside* the brackets of module.exports.

If you put it *below* the last bracket in the file, then you've put it outside of module.exports.

Nick

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/7913972a-de82-473a-a4d0-8766300b92d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jéan Roux

unread,
Feb 12, 2018, 6:03:36 PM2/12/18
to Node-RED
I have it inside Nick, 

    editorTheme: {
        projects: {
            enabled: true
        }
    }
}.    

 the above last bracket is the closing bracket of much earlier 

module.exports = {
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

Dave C-J

unread,
Feb 12, 2018, 6:06:03 PM2/12/18
to node...@googlegroups.com
and do you have a comma on the preceeding line 
(the one before editorTheme  that we can't see)

Nick O'Leary

unread,
Feb 12, 2018, 6:07:14 PM2/12/18
to Node-RED Mailing List
Remember that module.exports is an Object. As with JavaScript objects you have to comma separate the keys. So make sure you add a comma between it at the property above it.

Nick

To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Jéan Roux

unread,
Feb 12, 2018, 6:08:19 PM2/12/18
to Node-RED
nope...... let me check, I think you got it.....

Jéan Roux

unread,
Feb 12, 2018, 6:09:45 PM2/12/18
to Node-RED
it was the COMMA.....

Thanks guys.
Reply all
Reply to author
Forward
0 new messages