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

Can't install #5643

Closed
fireflysemantics opened this issue May 1, 2020 · 8 comments
Closed

Can't install #5643

fireflysemantics opened this issue May 1, 2020 · 8 comments
Assignees
Labels
not-reproducible Not able to reproduce the issue question General question

Comments

@fireflysemantics
Copy link

ole@mkt:~/Temp/aws$ npm i aws-amplify
npm ERR! Unexpected end of JSON input while parsing near '..."^1.0.0-alpha.5","@aw'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ole/.npm/_logs/2020-05-01T04_01_53_371Z-debug.log

@fireflysemantics fireflysemantics added the to-be-reproduced Used in order for Amplify to reproduce said issue label May 1, 2020
@mauerbac mauerbac self-assigned this May 1, 2020
@mauerbac mauerbac added question General question and removed to-be-reproduced Used in order for Amplify to reproduce said issue labels May 1, 2020
@mauerbac
Copy link
Member

mauerbac commented May 1, 2020

Hello - @fireflysemantics

Are you installing Amplify for the first time? Could you tell us more about your local environment ? To be safe, can you try installing in a clean directory?

@fireflysemantics
Copy link
Author

Hi @mauerbac. I install it all the time, but this is the first time in this project.

Here's an example sequence that I just did.

ole@mkt:~/Temp$ mkdir t
ole@mkt:~/Temp$ cd t
ole@mkt:~/Temp/t$ npm init -y
Wrote to /home/ole/Temp/t/package.json:

{
  "name": "t",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}


ole@mkt:~/Temp/t$ npm i aws-amplify
npm ERR! Unexpected end of JSON input while parsing near '..."^1.0.0-alpha.5","@aw'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ole/.npm/_logs/2020-05-01T15_52_43_957Z-debug.log
ole@mkt:~/Temp/t$ npm i stripe
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN t@1.0.0 No description
npm WARN t@1.0.0 No repository field.

+ stripe@8.48.0
added 3 packages from 49 contributors and audited 3 packages in 0.804s
found 0 vulnerabilities

ole@mkt:~/Temp/t$ 

So other NPM dependencies (Stripe in this case) install fine, but with Amplify I get the error you see.

@Amplifiyer
Copy link
Contributor

@fireflysemantics I just tried the same steps you mentioned and didn't get the error. Can you check if you are behind any proxy that might be intercepting the npm responses?

~
$ mktemp -d -t node
/var/folders/kp/vsqkwmwx557d97vplk9ml68c_vg6yb/T/node.0qGJAznT


~
$ cd /var/folders/kp/vsqkwmwx557d97vplk9ml68c_vg6yb/T/node.0qGJAznT



/var/folders/kp/vsqkwmwx557d97vplk9ml68c_vg6yb/T/node.0qGJAznT
$ npm init -y
Wrote to /private/var/folders/kp/vsqkwmwx557d97vplk9ml68c_vg6yb/T/node.0qGJAznT/package.json:

{
  "name": "node.0qGJAznT",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}



/var/folders/kp/vsqkwmwx557d97vplk9ml68c_vg6yb/T/node.0qGJAznT
$ npm i aws-amplify

> fast-xml-parser@3.16.0 postinstall /private/var/folders/kp/vsqkwmwx557d97vplk9ml68c_vg6yb/T/node.0qGJAznT/node_modules/fast-xml-parser
> node tasks/postinstall.js || exit 0

Love fast-xml-parser? Check https://amitkumargupta.work for more projects and contribution.

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @aws-amplify/datastore@2.0.10 requires a peer of @react-native-community/netinfo@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @aws-amplify/api@3.1.9 requires a peer of @aws-amplify/pubsub@^2.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN @aws-amplify/api-graphql@1.0.11 requires a peer of @aws-amplify/pubsub@^2.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN node.0qGJAznT@1.0.0 No description
npm WARN node.0qGJAznT@1.0.0 No repository field.

+ aws-amplify@3.0.10
added 147 packages from 412 contributors and audited 22679 packages in 10.486s
found 0 vulnerabilities

@Amplifiyer Amplifiyer added the not-reproducible Not able to reproduce the issue label May 1, 2020
@fireflysemantics
Copy link
Author

@Amplifiyer just to make sure there's nothing else running I rebooted my machine. I still get the same error.

@fireflysemantics
Copy link
Author

I set the NPM registry like this:

npm config set registry https://registry.npmjs.org/

@Amplifiyer
Copy link
Contributor

Amplifiyer commented May 1, 2020

Can you also post the complete NPM log? and your npm/node version

@fireflysemantics
Copy link
Author

Got it - Thanks for all the clues. This is the problem:

npm config set registry https://registry.npmjs.org/

Should be:

npm config set registry=https://registry.npmjs.com/

I guess the .org only works in ... some cases ... weird. Anyways THANK YOU for helping me trouble shoot!

@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 or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
not-reproducible Not able to reproduce the issue question General question
Projects
None yet
Development

No branches or pull requests

3 participants