Error running embedded NR with Node.js 0.12 on Windows

34 views
Skip to first unread message

Julian Knight

unread,
Aug 2, 2015, 3:00:05 PM8/2/15
to Node-RED
NOTE: I think I've resolved this problem. I suspect an issue with a long path. When I manually included Express 3 in the package.json, removed node_modules and reinstalled, everything worked. Clearly, NR did find Express the first time round and I'm still uncertain what has caused the error. 

I moved the entire installation to a shorter path but when I did, NR refused to find Express at all and that's when I had to manually install. Note that Express was in fact installed but NR refused to find it.

Note also that the same thing happened when I copied my working Pi configuration over to my dev machine. It failed with the same error until I manually included Express 3 in the package.json.

Might be worth noting somewhere since the error does not appear related to the problem as far as the user is concerned.

----------------------------------------------------


Sorry to be a pain but I'm trying to do some testing of a prototype system that will let non-expert users remotely administer Office 365.

To do this, I need to run Node-Red on a Windows server that is running in Azure.

I would really like to be able to run Node-Red from a locally installed version not a globally installed version. I've been doing this fine under Linux following the instructions in the docs for creating my own server.js and running with node server.js

Annoyingly, now I've tried to do this on my dev machine with Node 0.12 64-bit, it errors each time:

C:\Users\user1\Copy\Apps\node\nr3 {git}  : npm start                                                                               
                                                                                                                                    
> n...@1.0.0 start C:\Users\user1\Copy\Apps\node\nr3                                                                                
> node server.js                                                                                                                    
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    
Welcome to Node-RED                                                                                                                 
===================                                                                                                                 
                                                                                                                                    
2 Aug 19:08:14 - [info] Node-RED version: v0.11.1                                                                                   
2 Aug 19:08:14 - [info] Node.js  version: v0.12.7                                                                                   
2 Aug 19:08:14 - [info] Loading palette nodes                                                                                       
2 Aug 19:08:18 - [warn] ------------------------------------------                                                                  
2 Aug 19:08:18 - [warn] Failed to register 2 node types                                                                             
2 Aug 19:08:18 - [warn] Run with -v for details                                                                                     
2 Aug 19:08:18 - [warn] ------------------------------------------                                                                  
2 Aug 19:08:18 - [info] Settings file  : undefined                                                                                  
2 Aug 19:08:18 - [info] User directory : C:\Users\user1\.node-red                                                                  
2 Aug 19:08:18 - [info] Flows file : C:\Users\user1\.node-red\flows_Dev-PC.json                                                
2 Aug 19:08:18 - [info] Creating new flow file                                                                                      
2 Aug 19:08:18 - [info] Starting flows                                                                                              
2 Aug 19:08:18 - [info] Started flows                                                                                               
TypeError: Cannot read property 'length' of undefined                                                                               
    at Object.determineLangFromHeaders (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\red\i18n.js:123:37)                
    at module.exports.getAll (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\red\api\nodes.js:32:29)                      
    at callbacks (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\lib\router\index.js:164:37)         
    at C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\red\api\auth\index.js:61:13                                         
    at callbacks (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\lib\router\index.js:164:37)         
    at param (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\lib\router\index.js:138:11)             
    at pass (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\lib\router\index.js:145:5)               
    at Router._dispatch (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\lib\router\index.js:173:5)   
    at Object.router (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\lib\router\index.js:33:10)      
    at next (C:\Users\user1\Copy\Apps\node\nr3\node_modules\node-red\node_modules\express\node_modules\connect\lib\proto.js:174:15)
express deprecated res.json(status, obj): Use res.status(status).json(obj) instead node_modules\node-red\red\api\index.js:37:9      


Reply all
Reply to author
Forward
0 new messages