Skip to content

Conversation

@zarganum
Copy link

This will resolve the #34, #51 and potentially many others.
https://webpack.js.org/configuration/output/#outputglobalobject

The dynamic imports "workaround" in #34 prevents our npm run build and thus blocks the whole dev pipeline.

May I also suggest to review the current versions as some of them are 2+ years old.

Meanwhile (if anyone else is suffering from the same issue): in your text editor, open the node_modules/@g-loot/react-tournament-brackets/dist/bundle.js and add just one line in the very beginning:

const window = global.window;

many thanks

@UTkzhang
Copy link

UTkzhang commented Sep 5, 2023

@zarganum confirmed fix, can we merge and re-release, this is a fairly urgent bug haha (@Shenato)

@notShadowM
Copy link

@zarganum will the merge be soon? because it is needed :(

@zarganum
Copy link
Author

@zarganum will the merge be soon? because it is needed :(

I'd be more than happy... but I'm not the owner of this repo and not having write permissions, pls. ask @Shenato

@Shenato
Copy link
Contributor

Shenato commented Sep 26, 2023

Are you certain this doesn't have any drawbacks to how the library is compiled?

Have you tested it with non-nextjs projects. Like the main target this library has which is regular client side react libraries?

I have very little experience with this particular change in web pack so I would like confirmation with some end user testing that it works for client side rendering and server side as well.

@feldrok
Copy link

feldrok commented Oct 21, 2023

I need this! I can't use this on Next.js without this update + the window config...

@arathael
Copy link

While this gets merged, can someone please point out how to importa the forked repo? Is that possible since they have the same pacakge name and I am not being able to import normally or with the full user/repo format.

@feldrok
Copy link

feldrok commented Nov 24, 2023

While this gets merged, can someone please point out how to importa the forked repo? Is that possible since they have the same pacakge name and I am not being able to import normally or with the full user/repo format.

Haven't been able to do it, Vercel installs the package from npm. A workaround for this would be great.

@Shenato
Copy link
Contributor

Shenato commented Dec 4, 2023

Hey guys, Sorry for the late response, I wasn't sure this change was what was needed for the package overall, so I went ahead and migrated the package to not be compiled as a better way to make sure it supports nextjs and is more aligned with how packages today are built and so on

Please let me know if this PR fixes it #64

You can easily test it by npm installing this beta release https://www.npmjs.com/package/@g-loot/react-tournament-brackets/v/1.0.31-rc

@reckziegelwilliam
Copy link

Hey! Just a quick reminder to the great devs who have developed this library about the open issue. Would love to integrate this library into my Next/React app but hesitant to given any further issues that may have developed in the last 6 months.

@Shenato
Copy link
Contributor

Shenato commented Aug 8, 2024

Hey! Just a quick reminder to the great devs who have developed this library about the open issue. Would love to integrate this library into my Next/React app but hesitant to given any further issues that may have developed in the last 6 months.

Hey this library has moved to be under my personal github, because the organization that it is under now is no more. So they've kicked every dev out of the organizing which means no one can contribute to this repo as of today.

I'll try to get this particular fix merged under my own fork of this repo and publish some details on how to swap packages soon. Hopefully this weekend.

@Shenato
Copy link
Contributor

Shenato commented Aug 8, 2024

https://github.com/Shenato/react-tournament-brackets

This is where the package lives now.

Please check it out and give me feedback if you're able to install the new package. It no longer has the @g-loot/ prefix.

@Shenato
Copy link
Contributor

Shenato commented Aug 9, 2024

Try installing this package instead and see if it works with you guys on next.js

https://www.npmjs.com/package/react-tournament-brackets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants