aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.42k stars 2.12k forks source link

Can't resolve 'country-dial-codes' #4450

Closed samparnell closed 4 years ago

samparnell commented 4 years ago

Describe the bug In recent versions of the Amplify React package this error occurs.

This error appears when I upgrade to v2.5.4 or v3.1.0

Error Message:

Error: Can't resolve 'aws-amplify-react/dist/Auth/common/country-dial-codes'

To Reproduce Include the country dial codes in a react component.

import countryDialCodes from 'aws-amplify-react/dist/Auth/common/country-dial-codes'

Expected behavior This worked fine up to and including v2.5.2

haverchuck commented 4 years ago

@samparnell I think perhaps these weren't intended for usage other than by our own UI components, and weren't accounted for when we changed how our library is transpiled. In any case, you should be able to change this to import countryDialCodes from 'aws-amplify-react/lib/Auth/common/country-dial-codes' (lib instead of dist).

Does that work?

haverchuck commented 4 years ago

@samparnell Closing this issue due to inactivity.

github-actions[bot] commented 3 years ago

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.