amazon-archives / amazon-cognito-auth-js

The Amazon Cognito Auth SDK for JavaScript simplifies adding sign-up, sign-in with user profile functionality to web apps.
Apache License 2.0
423 stars 232 forks source link

Missing lib folder in NPM package #20

Open brentatkins opened 7 years ago

brentatkins commented 7 years ago

I'm not able to use the npm package when using CommonJS or ES2015 modules (get a "module not found" error). It looks like the /lib folder is missing from the node_modules folder.

I've tested this on NPM Runkit and it seems to experience the same problem: https://npm.runkit.com/amazon-cognito-auth-js

Is this something that was missed when publishing the package?

rcfrias commented 7 years ago

@brentatkins since this is a relatively new feature, there is not much support to cover every case. My recommendation, at least at this time, is to use cognito auth as a global library for your project. Im sure this will be improving as the time passes.

brentatkins commented 7 years ago

Ok. I'm using the object int he dist folder directly.

import { CognitoAuth } from 'amazon-cognito-auth-js/dist/amazon-cognito-auth';

Scotthorn0 commented 6 years ago

This seems like an issue that shouldn't be closed. I'm experiencing it currently, and used the above fix as a work around. Should this be added to the readme, or maybe update the package needs to be re-published?

jonasao commented 6 years ago

Agree with @Scotthorn0 this issue should remain open until fixed, or the workaround is present in the current readme.

yuntuowang commented 6 years ago

The README.md has been updated with this workaround. @jonasao @Scotthorn0