Amplify-js: Uncaught TypeError: Cannot set property 'createCredentials' of undefined

Created on 28 Mar 2018  路  11Comments  路  Source: aws-amplify/amplify-js

This is just to continue the thread left in the archived repo: https://github.com/aws/amazon-cognito-identity-js/issues/679

image

Cognito investigating

Most helpful comment

A workaround: https://github.com/MacKentoch/react-redux-bootstrap-webpack-starter/issues/5#issuecomment-330178816

I've had totally the same trouble, so now I can share with u details.
The reason is UglifyJsPlugin. Try to disable the plugin or setup it in a way to skip/exclude aws sdk.

It works :)

All 11 comments

@PrashanthThugaiah are you also using babel-polyfill?

No.

I also have this issue. any updates

A workaround: https://github.com/MacKentoch/react-redux-bootstrap-webpack-starter/issues/5#issuecomment-330178816

I've had totally the same trouble, so now I can share with u details.
The reason is UglifyJsPlugin. Try to disable the plugin or setup it in a way to skip/exclude aws sdk.

It works :)

Same here.

I've had the same problem when I build my app (in dev mode its working well). I have pinned down the problem to aws-amplify installing amazon-cognito-identity-js in /node_modules with crypto-browserify@^1.0.9 dependency. I fixed it by updating crypto-browserify to 3.12.0 in amazon-cognito-identity-js but that only works in my local machine. When my colleagues use 'npm install' in their machines, they run into the same issue. Is there any fix for this?

This might not be the best solution but just to get the application working I removed the UglifyJSPlugin from my webpack config. Then built and ran it again

You are right it's not the best solution. At least for me.

same issue. yikes..

https://github.com/MacKentoch/react-redux-bootstrap-webpack-starter/issues/5#issuecomment-335106227

worked for me though I am unsure how viable this is for everyone

Closed by PR #1773

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rayhaanq picture rayhaanq  路  3Comments

ldgarcia picture ldgarcia  路  3Comments

callmekatootie picture callmekatootie  路  3Comments

shinnapatthesix picture shinnapatthesix  路  3Comments

ddemoll picture ddemoll  路  3Comments