isotoma / react-cognito

Library for integrating Facebook React and Amazon Cognito
Apache License 2.0
116 stars 48 forks source link

Module not found: 'aws-cognito-sdk' node_modules/react-cognito/dist #5

Closed kbrown closed 6 years ago

kbrown commented 7 years ago

My compile is balking thusly when installing react-cognito from package.json/npm:

Module not found: 'aws-cognito-sdk' node_modules/react-cognito/dist

elsenhuc commented 7 years ago

+1

elsenhuc commented 7 years ago
kbrown commented 7 years ago

I had to do some post install hacking. You can read here about the aws-cognito-sdk: https://github.com/aws/amazon-cognito-identity-js

menisweet commented 7 years ago

i have it to! poor docs

alex2 commented 7 years ago

yeah bad doccies

sHtev commented 7 years ago

docs need a doc!

ddorsett commented 7 years ago

ok, just hit this. Docs are really horrible,.. kbrown or others: what was the post-install hacking?

ddorsett commented 7 years ago

Well, never mind- I decided to just drop down a level and use the cognito identity javascript library directly than mess with these wrappers

nalbion commented 7 years ago

@kbrown can you share your post-install hack?

marcmillien commented 7 years ago

@kbrown what was your trick to make it work? ^^

kbrown commented 7 years ago

@marcmillien I had to recreate the functionality of sdkshim.js and test.config.js in my project. I'm not sure that @Nokrosis' solution isn't better if Amazon isn't going to make the aws-cognito-sdk just work.

marcmillien commented 7 years ago

Thanks ^^. You'r right, the @Nokrosis PR is probably the best solution, let's hope it will be merged soon :).

zsy2053 commented 7 years ago

Hi is this problem solved? I have the same error

AlperKarapinar commented 7 years ago

Hi, we did solve this by aliasing aws-cognito-sdk inside webpack config.

resolve: {
  ...
    alias: {
     "aws-cognito-sdk": "amazon-cognito-identity-js/dist/aws-cognito-sdk.min.js"
    }
  },
dibell commented 6 years ago

fixed in 1.5.0