Problems installing 0.70 in debian

Hi
I have problem with 0.70 release installation like this post :

root@sp2lnx1:~/rocketchat/Rocket.Chat/programs/server# npm install
npm WARN lifecycle meteor-dev-bundle@~install: cannot run in wd %s %s (wd=%s) meteor-dev-bundle@ node npm-rebuild.js /root/rocketchat/Rocket.Chat/programs/server
updated 1 package in 0.936s
root@sp2lnx1:~/rocketchat/Rocket.Chat/programs/server# node ../../main.js
/root/rocketchat/Rocket.Chat/programs/server/node_modules/fibers/future.js:280
												throw(ex);
												^

Error: MONGO_URL must be set in environment
	at Object.<anonymous> (packages/mongo/remote_collection_driver.js:36:11)
	at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
	at new Collection (packages/mongo/collection.js:97:40)
	at new AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
	at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
	at server_main.js (packages/accounts-base/server_main.js:9:12)
	at fileEvaluate (packages/modules-runtime.js:343:9)
	at require (packages/modules-runtime.js:238:16)
	at /root/rocketchat/Rocket.Chat/programs/server/packages/accounts-base.js:2012:15
	at /root/rocketchat/Rocket.Chat/programs/server/packages/accounts-base.js:2019:3
	at /root/rocketchat/Rocket.Chat/programs/server/boot.js:411:36
	at Array.forEach (<anonymous>)
	at /root/rocketchat/Rocket.Chat/programs/server/boot.js:220:19
	at /root/rocketchat/Rocket.Chat/programs/server/boot.js:471:5
	at Function.run (/root/rocketchat/Rocket.Chat/programs/server/profile.js:510:12)
	at /root/rocketchat/Rocket.Chat/programs/server/boot.js:470:11

Check your ENV vars. For example:

# RocketChat
### export TOOL_NODE_FLAGS="--max_old_space_size=4096"
### export NODE_ENV=production
### export NODE_VERSION=default
export ROOT_URL=https://yourdomain.tld
export MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
export MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
### export PORT="3000"
### PORT can also changed in package.json:  "start": "meteor npm i && meteor --port 3000"
1 Like

problem solved by this solution .

npm scripts won’t run with root privileges unless you set the unsafe-perm flag: npm install --unsafe-perm . Maybe that’s why npm cannot run in “wd” (which, I assume, is the working directory).

@alirezaimi Thank’s for your feedback. Just out of interest: why does your server has to run with root privileges? For security reasons, I would personally bypass such a setup whenever possible.