Amplify-js: Undeclared dependencies on aws-amplify-react

Created on 24 Oct 2018  路  5Comments  路  Source: aws-amplify/amplify-js

Describe the bug
During runtime, aws-amplify-react depends (at least) on:

@aws-amplify/analytics
@aws-amplify/api
@aws-amplify/interactions
@aws-amplify/storage

But these dependencies are not declared on the respective package.json.
They seem to be expected to be installed by aws-amplify.
That wouldn't be a problem, but at least having them as peer-dependency would warn the developer about the problem.

To Reproduce
Steps to reproduce the behavior:

  1. Create an npm project
  2. Install and use aws-amplify-react and some @aws-amplify/* module, but not aws-amplify
  3. Run

Expected behavior
App should run OR aws-amplify-react should declare its own dependencies

Screenshots
-

Desktop (please complete the following information):

  • OS: All
  • Browser: All
  • Version: All

Additional context
I was trying to use only @aws-amplify/auth and aws-amplify-react.

Auth React feature-request

Most helpful comment

The docs seem to imply that this is already supposed to work: https://github.com/aws-amplify/amplify-js/wiki/Amplify-modularization#apply-modularized-amplify-to-other-packages

All 5 comments

@aldo-roman for now you must install aws-amplify when using aws-amplify-react. We will mark this as feature request.

The docs seem to imply that this is already supposed to work: https://github.com/aws-amplify/amplify-js/wiki/Amplify-modularization#apply-modularized-amplify-to-other-packages

I am using aws-amplify-react-native BTW and its the same issue

Closing the issue because the aws-amplify has been marked as peerDenpendencies.

Does aws-amplify-react really need to depend on @aws-amplify/xr?
I just want to have a component not Augmented Reality on my app.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benevolentprof picture benevolentprof  路  3Comments

callmekatootie picture callmekatootie  路  3Comments

ddemoll picture ddemoll  路  3Comments

oste picture oste  路  3Comments

romainquellec picture romainquellec  路  3Comments