Installation error
Hey guys i want to install rocket.chat on our intern server (Ubuntu 12.04). I followed the installation instruction from your wiki.
But now if i want to create the admin and i visit http://localhost:3000 i get this error:
Started MongoDB.
Errors prevented startup:
While processing files with templating (for target web.browser):
bundle/programs/web.browser/app/fonts/fontello.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you)
bundle/programs/web.browser/head.html:1: Expected one of: <body>, <head>, <template>
Your application has errors. Waiting for file change.
Hopefully you can help me :)
Cheers
That looks like the error I got when trying to run the command meteor after doing a meteor build. It might be worth linking to the wiki guide you used as there are a few different install methods and while I am not going to pretend to understand it just from my trial and error if you have built the app you can't then run it using meteor.
@emcguinness I followed exactly this instruction https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-Rocket.Chat-to-UBUNTU.
And yes i get this error, if i run meteor in the cli.
OK that is very similar to the guide I used, if not the same. After doing a meteor build you then need to use pm2 to run the app (ok there are other ways but from my brief research this has quite a few benefits). The last two steps of part 4 there are how you get it going.
pm2 start pm2-rocket-chat.json
pm2 save
The first loads the config file you made and the second command just saves it so on reboot the app should be relaunched. From then on you can use pm2 to manage it pm2 status will be a good starting point, as well as the help command. Running it like this it will not pick up on any modifications you make, so if you plan to run it as the devs provide that will do you.
Running it using the meteor command puts it into a live dev mode where any changes you make get pushed to the user (I have not looked into specifics of this). If you want to run it in the mode you have already done the prep work just re-extract rocket chat to a new directory, go into the directory and then you can launch meteor making sure you have your environmental variables set
HOST=http://my_host MONGO_URL=mongodb://localhost:27017/rocketchat MONGO_OPLOG_URL=mongodb://localhost:27017/local ROOT_URL=http://localhost:3000 PORT=3000 meteor
Just make sure to sub to alter the variables to match what ports you are using (those in my example are the default).
This is what i did already. PM2 is already configured and i build rocket.chat with the meteor build --server "$HOST" --directory ..
In the readme I'm on part 4 i want to create my first admin see here.
And now i get exactly this error message (which i mentioned above).
It seems there is a build error, because my head.html have no body, head or a template tag.
It looks like this:
<title>Rocket.Chat</title>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="fragment" content="!" />
<meta name="distribution" content="global" />
<meta name="rating" content="general" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="msapplication-TileColor" content="#04436a">
<meta name="msapplication-TileImage" content="/images/logo/mstile-144x144.png?v=3">
<meta name="msapplication-config" content="/images/logo/browserconfig.xml?v=3">
<meta name="theme-color" content="#04436a">
<link rel="manifest" href="/images/logo/manifest.json?v=3">
<link rel="icon" sizes="any" type="image/svg+xml" href="/images/logo/icon.svg?v=3">
<link rel="icon" sizes="256x256" type="image/png" href="/images/logo/favicon-256x256.png?v=3">
<link rel="icon" sizes="192x192" type="image/png" href="/images/logo/android-chrome-192x192.png?v=3">
<link rel="icon" sizes="128x128" type="image/png" href="/images/logo/favicon-128x128.png?v=3">
<link rel="icon" sizes="96x96" type="image/png" href="/images/logo/favicon-96x96.png?v=3">
<link rel="icon" sizes="64x64" type="image/png" href="/images/logo/favicon-64x64.png?v=3">
<!--
<link rel="icon" sizes="48x48" type="image/png" href="/images/logo/favicon-48x48.png?v=3">
<link rel="icon" sizes="32x32" type="image/png" href="/images/logo/favicon-32x32.png?v=3">
<link rel="icon" sizes="16x16" type="image/png" href="/images/logo/favicon-16x16.png?v=3">
-->
<link rel="shortcut icon" sizes="16x16 32x32 48x48" type="image/x-icon" href="/favicon.ico?v=3" />
<link rel="apple-touch-icon" sizes="57x57" href="/images/logo/apple-touch-icon-57x57.png?v=3">
<link rel="apple-touch-icon" sizes="60x60" href="/images/logo/apple-touch-icon-60x60.png?v=3">
<link rel="apple-touch-icon" sizes="72x72" href="/images/logo/apple-touch-icon-72x72.png?v=3">
<link rel="apple-touch-icon" sizes="76x76" href="/images/logo/apple-touch-icon-76x76.png?v=3">
<link rel="apple-touch-icon" sizes="114x114" href="/images/logo/apple-touch-icon-114x114.png?v=3">
<link rel="apple-touch-icon" sizes="120x120" href="/images/logo/apple-touch-icon-120x120.png?v=3">
<link rel="apple-touch-icon" sizes="144x144" href="/images/logo/apple-touch-icon-144x144.png?v=3">
<link rel="apple-touch-icon" sizes="152x152" href="/images/logo/apple-touch-icon-152x152.png?v=3">
<link rel="apple-touch-icon" sizes="180x180" href="/images/logo/apple-touch-icon-180x180.png?v=3">
Ahh, I got you. I missed the final step there of create an admin, that is a slightly older guide and you no longer need to do the create an admin step. If you open rocketchat in your browser (which I assume is working after you started it with pm2) and just click the create new user. The first user created automatically becomes an admin now meaning no playing in the mongo database.
The guide I used is here:
https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-Rocket.Chat-without-docker
Really it looks like you are all done, just that step 4 that is different but at least now it is a lot easier.
Ah this is good to know. After i follow your advice i found my problem, i need to uncomment the bind_ip configuration for mongodb (see ticket). But now i get this error :cry: .
rocket.chat-1 (err): ReferenceError: require is not defined
rocket.chat-1 (err): at bundle/programs/server/npm/rocketchat_ldap/node_modules/ldapjs/node_modules/pooling/node_modules/vasync/node_modules/jsprim/node_modules/extsprintf/lib/extsprintf.js:5:1
rocket.chat-1 (err): at bundle/programs/server/npm/rocketchat_ldap/node_modules/ldapjs/node_modules/pooling/node_modules/vasync/node_modules/jsprim/node_modules/extsprintf/lib/extsprintf.js:165:1
rocket.chat-1 (err): at /.../rocket-chat/bundle/programs/server/boot.js:242:10
rocket.chat-1 (err): at Array.forEach (native)
rocket.chat-1 (err): at Function._.each._.forEach (/../rocket-chat/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
rocket.chat-1 (err): at /.../rocket-chat/bundle/programs/server/boot.js:137:5
@emcguinness Thank you for your support i found my error.
The error was that the $HOST variable must me without http/https.
Love it :heart: