alexandrtovmach / react-microsoft-login

Microsoft services authorization with React.
https://alexandrtovmach.github.io/react-microsoft-login
MIT License
80 stars 38 forks source link

Warning: React.createElement: type is invalid -- expected a string #48

Closed voloshyndmitry closed 4 years ago

voloshyndmitry commented 4 years ago

Hi All! Steps to reproduce: When I use:

"dependencies": {
    "react-aad-msal": "2.3.5",
    "react-microsoft-login": "1.8.5"
  }
import { AzureAD } from 'react-aad-msal';

in create react app (dev env) all work fine. But after build(prod env) I got:

Actual result:

Warning: React.createElement: type is invalid -- expected a string (for built-in components)
or a class/function (for composite components) but got: undefined. You likely forgot to
export your component from the file it's defined in. Check the render method of

How to fix:

import AzureAD from 'react-aad-msal';

Maybe it's not a bug. But I didn't find it in the documentation.

alexandrtovmach commented 4 years ago

@voloshyndmitry Why do you think it's related to react-microsoft-login instead of react-aad-msal?

voloshyndmitry commented 4 years ago

Oh. yes, sorry - wrong repository