Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

rocketchat 0.45 can't load hubot-help/src/help.coffee

Open ghost opened this issue 10 years ago • 8 comments

Rocket.Chat 0.45

Hello Devs.

After upgrading to 0.45 i get this warning. Should i be worried?

[Tue Nov 01 2016 12:53:23 GMT+0100 (CET)] WARNING A script has tried registering a HTTP route while the HTTP server is disabled with --disabled-httpd.
can't load hubot-help/src/help.coffee
{ [Error: ENOENT: no such file or directory, open '/opt/Rocket.Chat-0.45.0/programs/server/npm/rocketchat_internal-hubot/node_modules/hubot-help/src/help.coffee']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/opt/Rocket.Chat-0.45.0/programs/server/npm/rocketchat_internal-hubot/node_modules/hubot-help/src/help.coffee' }

thanks and cheers

ghost avatar Nov 01 '16 11:11 ghost

yup, we see that too

jmls avatar Nov 01 '16 12:11 jmls

Think it look like a path error:

No such file or directory : ./Rocket.Chat/programs/server/npm/rocketchat_internal-hubot/node_modules/hubot-help/src/help.coffee

File actually exists here : ./Rocket.Chat/programs/server/npm/node_modules/meteor/rocketchat_internal-hubot/node_modules/hubot-help/src/help.coffee

reetp avatar Nov 01 '16 18:11 reetp

seems a path problem, with this simple patch it compiles correctly:

diff --git a/packages/rocketchat-internal-hubot/hubot.coffee b/packages/rocketchat-internal-hubot/hubot.coffee
index 9a258ef..9dbc5ad 100644
--- a/packages/rocketchat-internal-hubot/hubot.coffee
+++ b/packages/rocketchat-internal-hubot/hubot.coffee
@@ -154,7 +154,7 @@ class HubotScripts
                for modulePath in modulesToLoad
                        try
                                Npm.require(modulePath)(robot)
-                               robot.parseHelp __meteor_bootstrap__.serverDir+'/npm/rocketchat_internal-hubot/node_modules/'+modulePath
+                               robot.parseHelp __meteor_bootstrap__.serverDir+'/npm/node_modules/meteor/rocketchat_internal-hubot/node_modules/'+modulePath
                                console.log "Loaded #{modulePath}".green
                        catch e
                                console.log "can't load #{modulePath}".red

xadhoom avatar Nov 03 '16 14:11 xadhoom

@xadhoom can u tell me wher a past that code ?

Nemra1 avatar Nov 04 '16 01:11 Nemra1

@Nemra1 it's written in the patch itself :), if you cannot read it, better wait the fix from the developers

xadhoom avatar Nov 04 '16 09:11 xadhoom

I have tried to replace /npm/rocketchat_internal-hubot/node_modules/ with /npm/node_modules/meteor/rocketchat_internal-hubot/node_modules/ in the programs/server/packages/rocketchat_internal-hubot.js It seems to be working!

FTDJerry avatar Nov 08 '16 10:11 FTDJerry

Still getting this issue in newest snap install version 0.45 on ubuntu 16:04.1, lts but not able to edit any of the files within snap as they are read only

Is there a fix for this?

kayne31 avatar Nov 20 '16 11:11 kayne31

Fixed.

Huljo avatar Nov 22 '16 22:11 Huljo