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

Amplify init fails on another machine #1122

Closed
michaelcuneo opened this issue Mar 26, 2019 · 9 comments · Fixed by #1357
Closed

Amplify init fails on another machine #1122

michaelcuneo opened this issue Mar 26, 2019 · 9 comments · Fixed by #1357
Assignees
Labels
bug Something isn't working investigating This issue is being investigated multienv Issues tied to multiple environment feature in the CLI

Comments

@michaelcuneo
Copy link

I'm at work right... I type amplify init, I do all my work, later at home, I pull the project from github and want to work on it... so I hit amplify add env, pick the env that I added at work...

It complains, fails to compile, won't do a thing... how am I meant to do this correctly?

** Which Category is your question related to? **
amplify in general...

** What AWS Services are you utilizing? **
amplify-cli

** Provide additional details e.g. code snippets **

@kaustavghosh06
Copy link
Contributor

What’s the error that you’re getting? Are the CLI versions the same as what you used at work and what you’re using at home? Would be helpful for us to know the error stack and get more information to root-cause your issue.

@michaelcuneo
Copy link
Author

/home/michael/.nvm/versions/node/v8.15.0/lib/node_modules/@aws-amplify/cli/node_modules/gluegun/build/index.js:13
throw up;
^

SyntaxError: Unexpected token h in JSON at position 0
at JSON.parse ()

@UnleashedMind UnleashedMind added multienv Issues tied to multiple environment feature in the CLI pending-triage Issue is pending triage labels Mar 26, 2019
@kaustavghosh06
Copy link
Contributor

Are the CLI versions the same as what you used at work and what you’re using at home?
Also what are the files that you checked in in github?
Can I take a look at your .gitignore file or the project structure when you pulled the project on your local machine at home?

@kaustavghosh06 kaustavghosh06 added investigating This issue is being investigated pending-response Issue is pending response from the issue author labels Mar 29, 2019
@michaelcuneo
Copy link
Author

I'm pretty sure they are. I regularly do a npm upgrade and update every single part of my project, on all sides. I git push at work, git pull at home. But amplify-js never appears to transfer across nicely.

# Don't check auto-generated stuff into git
coverage
build
node_modules
stats.json

# Cruft
.DS_Store
npm-debug.log
.idea

#amplify
amplify/\#current-cloud-backend
amplify/.config/local-*
amplify/backend/amplify-meta.json
aws-exports.js
awsconfiguration.json

That's my .gitignore, all autogenerated by things I install.

@UnleashedMind UnleashedMind removed the pending-response Issue is pending response from the issue author label Apr 1, 2019
@kaustavghosh06
Copy link
Contributor

@michaelcuneo Can you provide the file structure that you have in the system where you're seeing this issue?

@kaustavghosh06 kaustavghosh06 added the pending-response Issue is pending response from the issue author label Apr 12, 2019
@yuth
Copy link
Contributor

yuth commented Apr 19, 2019

@michaelcuneo Is one of the machine windows?

@michaelcuneo
Copy link
Author

No, the other machine is an Intel server running Ubuntu. I use OSX at work, Ubuntu or Docker for my dev at home.

@kaustavghosh06 kaustavghosh06 added bug Something isn't working and removed pending-triage Issue is pending triage labels Apr 26, 2019
yuth added a commit that referenced this issue Apr 26, 2019
Some editors and platforms can add UTF BOM at the begining of the file. Node JSON.parse doesn't
handle the BOM enchoding very well and chokes the CLI. Updating the CLI to use a util method which
can handle the BOM chars

fix #1355 #1122
yuth added a commit that referenced this issue Apr 29, 2019
Some editors and platforms can add UTF BOM at the begining of the file. Node JSON.parse doesn't
handle the BOM enchoding very well and chokes the CLI. Updating the CLI to use a util method which
can handle the BOM chars

fix #1355 #1122
@yuth yuth added pending-release Code has been merged but pending release and removed pending-response Issue is pending response from the issue author pending-release Code has been merged but pending release labels Apr 29, 2019
@yuth
Copy link
Contributor

yuth commented Apr 30, 2019

Released in Amplify CLI 1.6.6. Please re-open the issue if the problem still persist

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working investigating This issue is being investigated multienv Issues tied to multiple environment feature in the CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants