-
Notifications
You must be signed in to change notification settings - Fork 35
awsmobile command does not work and hangs #157
Comments
Same issue with same environment (Windows 10, NodeJS 10). |
@rqton Is correct I had node 10 and downgraded to lts and it worked Thanks! |
Downgrading is not a good workaround, that is ridiculous, there are many features we would be giving up to downgrade node. What is the latest status on this, it has been in investigation for over 1 month? |
After looking into the source code I am 100% positive that this issue is related to Inquirer.js in combination with NodeJS 10.x.x. In file: function setConfig(awsDetails, callback){
if(!awsDetails){
awsDetails = resolveAWSConfig(true)
}
let awsInfo = awsDetails.info
let awsConfig = awsDetails.config
inquirer.prompt([
{
type: 'input',
name: 'accessKeyId',
message: "accessKeyId: ",
default: awsConfig.accessKeyId
},
{
type: 'input',
name: 'secretAccessKey',
message: "secretAccessKey: ",
default: awsConfig.secretAccessKey
},
{
type: 'list',
name: 'region',
message: "region: ",
choices: awsMobileRegions,
default: awsConfig.region
}
]).then(function (answers) {
let awsConfigChanged = false
if(answers.accessKeyId){
let newKeyId = answers.accessKeyId.trim()
if(awsConfig.accessKeyId != newKeyId){
awsConfig.accessKeyId = newKeyId
awsConfigChanged = true
}
}
if(answers.secretAccessKey){
let newKey = answers.secretAccessKey.trim()
if( awsConfig.secretAccessKey != newKey){
awsConfig.secretAccessKey = newKey
awsConfigChanged = true
}
}
if(answers.region){
let newRegion = answers.region.trim()
if( awsConfig.region != newRegion){
awsConfig.region = newRegion
awsConfigChanged = true
}
}
if(awsConfigChanged){
let jsonString = JSON.stringify(awsConfig)
fs.writeFileSync(awsInfo.AWSConfigFilePath, jsonString, 'utf8')
awsConfigInfoManager.setNoProfileSync(awsInfo)
}
if(callback){
callback(awsDetails)
}
})
} After the |
Hi, this is really frustrating. For a company as large as Amazon, this should not be a problem. Has anyone looked at Megajin's analysis and developed an alternative? |
Sorry to hear your frustration. |
Had the same problem. The following command which bypasses the prompts worked for me: awsmobile configure aws $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY $AWS_DEFAULT_REGION |
This worked for me as well. I'm running Node 10.15 |
I had the same problem and nothing was really working and I ended up using the git scm bash command line and running the command and was able to configure and init the whole thing hope that helps. |
Hi,
When using awsmobile configure/pull commands the command hangs up and does not execute. This is the same case for awsmobile init command as well
The entire command hangs and i am forced to exit it with Ctrl + C. I am running windows 10 and the latest version of nodejs.
P.S This occurs only on the latest version of nodejs(10.4) when i used the LTS everything was fine.
The text was updated successfully, but these errors were encountered: