Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

"Require is not defined" #17

Open
Strainy opened this issue May 29, 2017 · 2 comments
Open

"Require is not defined" #17

Strainy opened this issue May 29, 2017 · 2 comments

Comments

@Strainy
Copy link

Strainy commented May 29, 2017

Hi all,

Having trouble getting set up. When importing anything from react-cognito into my project I'm getting a "Require is not defined" error. Here are the steps I've taken to install:

  1. Install react and react-dom 15.4.2
  2. npm install --save-dev react-cognito
  3. npm install --save-dev amazon-cognito-identity-js

Am I missing anything here? Have just followed the docs at:
https://doc.esdoc.org/github.com/isotoma/react-cognito/manual/installation/install.html

@dibell
Copy link
Contributor

dibell commented Aug 4, 2017

Require is build into node. What version of node are you using?
Try the new react-cognito-example repo.

@ajhool
Copy link

ajhool commented Nov 14, 2017

This error commonly occurs when you are trying to execute node.js in the browser.

You may be interested in browserify (http://browserify.org/) or including <script src="/path/to/amazon-cognito.min.js"></script>

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

No branches or pull requests

3 participants