accounts-ui icon indicating copy to clipboard operation
accounts-ui copied to clipboard

Component not rendered & Error with Meteor 1.6

Open sgup opened this issue 6 years ago • 22 comments

I get this error when using with Meteor 1.6.1 and FlowRouter, using the following code:

import { Accounts } from 'meteor/std:accounts-ui';
...
FlowRouter.route("/login", {
  action(params) {
    mount(AppLayout, {
      content: <Accounts.ui.LoginForm />
    });
  }
});
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
    in Unknown
    in div (created by AppLayout)
    in AppLayout

sgup avatar Mar 04 '18 01:03 sgup

I have this same error while using react-router.

hitch90 avatar Mar 05 '18 10:03 hitch90

Ditto, same error.

Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.

jasongrishkoff avatar Mar 05 '18 16:03 jasongrishkoff

Looks like it's solved with this pull request: https://github.com/studiointeract/accounts-ui/pull/138/files

If you need it now, you can create a directory called "packages" in your meteor app. Then you'll git clone this repo, edit the packages.json to change version to 1.3.2, and edit your .meteor/packages to reflect @1.3.2 as the version for this package. You can then edit the file as shown in that pull request, and bam! It'll work <3

jasongrishkoff avatar Mar 05 '18 19:03 jasongrishkoff

Can that pull request just be merged into master?

tab00 avatar Apr 04 '18 09:04 tab00

Thanks @jasongrishkoff In your "instruction" there is one mistake (I think), version change should be done inside packages/accounts-ui/package.js file not packages/accounts-ui/packages.json.

jmarceli avatar Apr 05 '18 08:04 jmarceli

Who are the maintainers of this repository? Is this project dead?

yanickrochon avatar Apr 25 '18 14:04 yanickrochon

Meteor 1.7 was released, still no update on this?

yanickrochon avatar Jun 16 '18 07:06 yanickrochon

Very strange, even my PR #135 fixed this, the maintainer closed it without merging it. Only the createContainer was replace with withTracker.

kwunyeung avatar Jul 02 '18 18:07 kwunyeung

I cloned a forked repo which seems to work or doesn't throw an error right now https://github.com/idmadj/accounts-ui.git

silkroadnomad avatar Jul 06 '18 16:07 silkroadnomad

+1 for this problem too. Many thanks for your patch @jasongrishkoff!

ratcliffej avatar Jul 08 '18 12:07 ratcliffej

@inspiraluna, is it an atmosphere package (that we can install by meteor add)?

tab00 avatar Aug 15 '18 07:08 tab00

@tab00 no. I was forking it by myself and just added a couple changes. I might should make a pull request back to the project.

See my changes: https://github.com/Doichain/accounts-ui/commit/8cf24a1c3a161723faa6a8fb046f4d45ded5967c (I don't know the actual progress of this issue here, why nobody fixes it or if its fixed somewhere else now)

What you have to do in order to use it:

  1. make a folder 'packages' in your meteor project directory
  2. cd packages git clone https://github.com/Doichain/accounts-ui.git
  3. meteor should reload the package.

Let me know if it works for you. P.S. I was adapting a accounts-material-ui on top of it in case you like to try it: Works the same way - just put it into packages: https://github.com/Doichain/accounts-material.git

silkroadnomad avatar Aug 15 '18 07:08 silkroadnomad

@inspiraluna the package accounts-ui requires react-tap-event-plugin, however once installed, it throws "Cannot read property 'injection' of undefined".

I believe others have removed this dependency successfully, and this should get updated.

Also, Material UI is at version 3.1.1 while your module depends on 0.16.x. It's about time to upgrade :stuck_out_tongue_closed_eyes:

yanickrochon avatar Sep 28 '18 18:09 yanickrochon

Facing the same issue, no updates since months, if this repo is no more maintained, please state it clearly in the README so we don't waste time to install it. Thank you.

lc3t35 avatar Dec 15 '18 15:12 lc3t35

Hello @lc3t35 , it's interesting because last night I was updating my meteor 1.8 (with react 15.x to react 16.6.3. I also had this problem. So I removed react-tap-event-plugin to work with react 16.6.3. See: https://github.com/Doichain/accounts-ui/releases/tag/release-1.2.24 Do you use react 16.x? I am not yet a react professional, since I mostly do other things durring the day. So I'd be very happy to get some comments or recommendations on that. Thanks @yanickrochon btw. on your hints which I overread as it seems.

silkroadnomad avatar Dec 15 '18 15:12 silkroadnomad

Hi @inspiraluna , [email protected] (meteor 1.8 too), I'm trying https://github.com/royGil/accounts-react now ...

lc3t35 avatar Dec 15 '18 16:12 lc3t35

makes sense. Let us know here how it was going maybe I'd like to switch too!

silkroadnomad avatar Dec 15 '18 16:12 silkroadnomad

@lc3t35 which styling do you use? I am porting to material ui now.

silkroadnomad avatar Dec 21 '18 14:12 silkroadnomad

how about we decide to continue with https://github.com/idmadj/accounts-ui.git then?

it seems to work.

JonathanLehner avatar Dec 23 '18 02:12 JonathanLehner

@JonathanLehner seems to use react 15 - in case you want to be up to date with react 16 the whole router 4 situation needs to be changed in this package. https://github.com/royGil/accounts-react uses the new react router 4.

silkroadnomad avatar Dec 23 '18 07:12 silkroadnomad

I tried it with my code and it seems to work. I think react 15 and 16 are mostly compatible.

On Sun, 23 Dec 2018, 02:46 Nico Krause <[email protected] wrote:

@JonathanLehner https://github.com/JonathanLehner seems to use react 15

  • in case you want to be up to date with react 16 the whole router 4 situation needs to be changed in this package. https://github.com/royGil/accounts-react uses the new react router 4.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/studiointeract/accounts-ui/issues/139#issuecomment-449620198, or mute the thread https://github.com/notifications/unsubscribe-auth/AWDnnDE1E0S_gY10bl_w2x0t6c178JRfks5u7zTZgaJpZM4SbJkd .

JonathanLehner avatar Dec 23 '18 07:12 JonathanLehner

Please clearly mark this package as being deprecated. It's a waste of time installing it if such a basic error pops up und no fixes have been provided since over a year. Thanks.

derwaldgeist avatar Apr 02 '19 21:04 derwaldgeist