Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with mup setup #185

Closed
Tbutnyakov opened this issue Aug 4, 2016 · 32 comments
Closed

Problem with mup setup #185

Tbutnyakov opened this issue Aug 4, 2016 · 32 comments

Comments

@Tbutnyakov
Copy link

Tbutnyakov commented Aug 4, 2016

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!

@CaptainChemist
Copy link

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

@Tbutnyakov
Copy link
Author

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".

@CaptainChemist
Copy link

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.

@betharavikiran
Copy link

betharavikiran commented Aug 4, 2016

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:[email protected]:10543,moloa.16.mongolayer.com:10543/lookfab_db?replicaSet-set-4340ge85ef93e267be000688",
"MONGO_OPLOG_URL":"mongodb://oploguser:[email protected]: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: {},
},
},
/
};

@Tbutnyakov
Copy link
Author

Tbutnyakov commented Aug 4, 2016

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: {}
}
}
};

@CaptainChemist
Copy link

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

@betharavikiran
Copy link

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:[email protected]:10543,moloa.16.mongolayer.com:10543/lookfab_db?replicaSet-set-4340ge85ef93e267be000688",
"MONGO_OPLOG_URL":"mongodb://oploguser:[email protected]: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: {},
},
},
/
};

@CaptainChemist
Copy link

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

@betharavikiran
Copy link

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.

@madushan1000
Copy link
Contributor

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.

@betharavikiran
Copy link

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

@betharavikiran
Copy link

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

@madushan1000
Copy link
Contributor

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

@Tbutnyakov
Copy link
Author

@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?

@madushan1000
Copy link
Contributor

try where mup and use that path.

@Tbutnyakov
Copy link
Author

@madushan1000 the same. I use correct path.

@betharavikiran
Copy link

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 ?

@betharavikiran
Copy link

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

@betharavikiran
Copy link

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

@madushan1000
Copy link
Contributor

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.

@Tbutnyakov
Copy link
Author

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

@madushan1000
Copy link
Contributor

What docker features do you need?

@Tbutnyakov
Copy link
Author

@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.

@Tbutnyakov
Copy link
Author

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

@GuillaumeDeconinck
Copy link

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

@madushan1000
Copy link
Contributor

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.

@nicklammertyn
Copy link

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!

@issachan
Copy link

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

@bennygenel
Copy link

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

@zodern zodern closed this as completed Feb 11, 2017
@iamrommel
Copy link

iamrommel commented Feb 22, 2017

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

@zodern
Copy link
Owner

zodern commented Feb 22, 2017

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

@iamrommel
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants