zodern/meteor-up

Problem with mup setup

Tbutnyakov opened this issue ยท 32 comments

Hey, i have a problem with mup setup, it looks like windows dont know nothing about "module.exports".
More:
I got "Windows script error", first time i took error about unecspected tokens like "," after some "}".
When, after refactor, i took err message about "'module' is not defined".

Ehm...may be we miss a part of initialization mup in guide?

@arunoda @madushan1000 One more question, what about store uploaded files in static folder on server in this package? In MUPX we have serious problem: #1101

Is it fixed in that package?
Guys, ty for awesome packages!

I am not really clear where you are getting this issue. Does npm install -g mup work without any errors?

Yes, it is work fine. I can call "mup init", and "mup" will build the project.
But, i get error only when i try to "mup.js".

So you should type "mup setup" after "mup init". Does that work? If it doesn't, can you copy your mup.js here and we can take a look.

I also installed meteor up and when I run setup and deploy, nothings happens. The commands executes silently, these are ran from windows 10 machine, so like Tbutnyakov mentioned, may be the issue is module.exports which is not being recognised.

:\project_beauty\lookfab>mup setup

M:\project_beauty\lookfab>mup deploy

M:\project_beauty\lookfab>

module.exports = {
servers: {
one: {
host: '139.59.20.aaa',
username: 'root',
pem: "privatekey.ppk"
// password:
// or leave blank for authenticate from ssh-agent
}
},

setupNode: true,
nodeVersion: "4.4.7",

meteor: {
name: 'lookfab',
path: 'M:\project_beauty\lookfab',
servers: {
one: {
host: '139.59.20.aaa',
username: 'root',
}
},
buildOptions: {
serverOnly: true,
},
env: {
"ROOT_URL": "https://139.59.20.aaa",
"PORT":8080,
"MONGO_URL":"mongodb://devuser:devuseraaa@moloa.15.mongolayer.com:10543,moloa.16.mongolayer.com:10543/lookfab_db?replicaSet-set-4340ge85ef93e267be000688",
"MONGO_OPLOG_URL":"mongodb://oploguser:oploguser1234@moloa.15.mongolayer.com:10543/local?authSource=lookfab_db",
},
ssl:{
crt: 'ssl.pem',
key: 'privatekey.pem',
port: 443
},

//dockerImage: 'kadirahq/meteord'
deployCheckWaitTime: 1000

},

/mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
/
};

Yes, i can call "mup setup". It will ask me abot "mup.js".

Here a code:

module.exports = {
servers: {
one: {
host: 'strangehost',
username: 'strangename',
password: "strangename"
}
},
meteor: {
name: 'strangeapp',
path: '../strangeapp',
buildOptions: {
serverOnly: true,
debug: true
},
env: {
ROOT_URL: 'strangeapp.club',
MONGO_URL: 'mongodb://localhost/meteor'
},
log: {
driver: 'syslog',
opts: {
"syslog-address":'udp://syslogserverurl.com:1234'
}
},
dockerImage: 'kadirahq/meteord',
deployCheckWaitTime: 60
},
mongo: {
oplog: true,
port: 27017,
servers: {
one: {}
}
}
};

I had this issue yesterday, I think. Provide the full path to the pem key- it doesn't work with relative paths.

i updated the script with full paths for all files and when i run mup setup, it immediately returns back with out any activity.

M:\project_beauty\lookfab>mup setup

M:\project_beauty\lookfab>

module.exports = {
servers: {
one: {
host: '139.59.20.aaa',
username: 'root',
pem: "M:/project_beauty/lookfab/privatekey.ppk"
// password:
// or leave blank for authenticate from ssh-agent
}
},

setupNode: true,
nodeVersion: "4.4.7",

meteor: {
name: 'lookfab',
path: 'M:/project_beauty/lookfab',
servers: {
one: {
host: '139.59.20.aaa',
username: 'root',
}
},
buildOptions: {
serverOnly: true,
},
env: {
"ROOT_URL": "https://139.59.20.aaa",
"PORT":8080,
"MONGO_URL":"mongodb://devuser:devuseraaa@moloa.15.mongolayer.com:10543,moloa.16.mongolayer.com:10543/lookfab_db?replicaSet-set-4340ge85ef93e267be000688",
"MONGO_OPLOG_URL":"mongodb://oploguser:oploguser1234@moloa.15.mongolayer.com:10543/local?authSource=lookfab_db",
},
ssl:{
crt: 'M:/project_beauty/lookfab/ssl.pem',
key: 'M:/project_beauty/lookfab/privatekey.pem',
port: 443
},

dockerImage: 'kadirahq/meteord',
deployCheckWaitTime: 1000

},

/mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
/
};

do you need that ssl: {} block? Maybe try removing the mongo : {} block too.

yes, i want to setup https connection for my server and hence need ssl. I tried by commenting those lines and also changing the url to http, but still same behavior. Mongo block is commented, i removed it anyway now.

I suspect the issue is that the process is not running through the file at all as "module.exports" does not seem recognized by windows.

You get "Windows script error" because windows script host tries to run mup.js config file instead of the actual mup binary. Use the absolute path to the mup binary.

can you give an example on how to do it. Until now, i was not passing any param to the mup, so how should this be done now onwards ?

lets say the mup in installed globally in c:/appdata/roaming/npm/node_mobules/mup and my project folder is c:/projects/myproject/mup.js

for this context, how should we call mup now onwards on windows

madushan1000, please advise how to go about with an example call

run c:/appdata/roaming/npm/node_mobules/mup setup in your project folder.

@madushan1000 we will got errors on this case:
For example: "c:\Users\Tim\AppData\Roaming\npm\node_modules\mup setup" command will call error.
Something like: "This is a not executive programm or package file".
100 percent.

"Npm run" not help too, it trying to find package.json inside project folder, not in the argument path...

@madushan1000 can you, please, answer this question:

One more question, what about store uploaded files in static folder on server in this package? In MUPX we have serious problem: #1101
Is it fixed in that package?

try where mup and use that path.

@madushan1000 the same. I use correct path.

agreed with Tim. got the error stating as below
'C:\Users\betha\AppData\Roaming\npm\node_modules\mup' is not recognized as an internal or external command, operable program or batch file.

is there a reason why simpler things are becoming difficult to use ?

@madushan1000, please help as we are currently stuck in the same point for quite some time

hey guys any updates, i am not able to deploy ... any one who could do successfully ?

I'm sorry but I can't test the windows version myself because I don't own a windows PC or a licence. The best I can do it speculation. As a quick solution, you can use the older mupx from npm. It didn't have this problem. You would have to change the configuration file according to mupx readme.

@madushan1000 cant, because mupx dont support dynamic docker containers.

What docker features do you need?

@madushan1000 here it is: #1101
If you tell me what can i check in installed mup package, i can try to help you find a bug in new mup.

Im just switch OS from windows to linux.
In linux package works good.

Same problem here, it tries to open/execute the mup.js file instead of executing mup.
The solution suggested by @madushan1000 worked for me.

I added the support to use command line parameter --config and --settings to specify config files. It's not in the npm yet. If you want to try use the cli-options branch from the repo.

Just switched over from mupx and ran into the same problem, using the --config parameter with a renamed mup.js file works like a charm, thanks @madushan1000!

Just adding that I am on Windows and this was also the issue I had when "mup setup" appeared to do nothing. Thanks @madushan1000

On Windows instead using
mup setup
using
mup.cmd setup
works for me.

I think we need to put the commont of @bennygenel on ReadMe, first install bug, or fix this for windows client...

It is on the readme in two places, but I can make it more visible.

wow, that's great. I maybe over look it, as i have read that readme months ago and never notice that there is update on it. Thanks anyway for the info. great work @zodern for making this mup alive again