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

Module not found: Can't resolve 'amazon-cognito-identity-js' #6

Open
berenddeboer opened this issue Jan 23, 2020 · 4 comments
Open

Comments

@berenddeboer
Copy link

I see this after following the installation instructions:

Failed to compile

./node_modules/ra-cognito/dist/AuthProvider/index.js
Module not found: Can't resolve 'amazon-cognito-identity-js' in '/home/berend/src/angrycactus/libya/admin/node_modules/ra-cognito/dist/AuthProvider'

I got past this with:

npm install amazon-cognito-identity-js

But then got:

Failed to compile

./node_modules/ra-cognito/dist/AuthProvider/index.js
Module not found: Can't resolve 'aws-amplify' in '/home/berend/src/angrycactus/libya/admin/node_modules/ra-cognito/dist/AuthProvider'

I installed that, and then got:

Failed to compile

./node_modules/ra-cognito/dist/AuthProvider/index.js
Module not found: Can't resolve 'ramda' in '/home/berend/src/angrycactus/libya/admin/node_modules/ra-cognito/dist/AuthProvider'

Solved this and the final one with:

npm install ramda redux-form

Shouldn't the package lists its dependencies more properly in the "dependencies" section? This is just unnecessarily tedious.

@jsh8w
Copy link

jsh8w commented Jan 24, 2020

Hi @berenddeboer. Yes we are aware of this issue. The dependencies you mentioned are listed in the peerDependencies with the package.json so they are required to be in the project that you are using the package in.

We are currently working on a new version of the package which will be released soon. We will ensure all required packages are added to the dependencies.

@igoratron
Copy link

Hey @jsh8w, has there been any progress on the new version?

@mneil
Copy link

mneil commented Jun 7, 2020

Just ran into this. Seems like these amplify, ramba, cognito, etc... are all required dependencies - not peer dependencies as they don't specify any specific version requirements beside the typical greater than some version at dev time.

I had to additionally install

npm install amazon-cognito-identity-js aws-amplify prop-types ramda recompose redux-form

I don't think you should consider users to have these requirements in their package before they try and use ra-cognito.

@linkcd
Copy link

linkcd commented Dec 1, 2020

I did not realise this component requires amplify lib. Does this mean this lib has to be used together with amplify? I have a SPA with lambda, guess that won't meet the requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants