blocks-template
blocks-template copied to clipboard
Clone, install, build, start? Fail.
Hiya. Super excited to try this. Windows 10 up to date, npm, running from git bash. Started from a fork of your repo, otherwise unaltered.
git cloneworksnpm installworksnpm buildworksnpm startfails three ways- On starting, announces that it cannot resolve
react-dom/client(1) - Immediately replaces that message with a cullscreen clear, where
viteyields a failure about being unable to resolve the same library (2) - Yields an in-browser error regarding this when hit in browser (3)
- On starting, announces that it cannot resolve
1:

2:

3:

I tried manually installing react-dom as a dev dep; didn't help.
Confirmed same behavior in dos console and powershell
Confirmed same behavior when switching to yarn, even when removing yarn-lock and package-lock then reinstalling as from #28 first
Tried to build an alpine image and build in there.
If you mount the existing directory, esbuild complains that it was built for a different platform
If you try to install internally, esbuild complains that it can't figure out what platform it is
Set up an actual Ubuntu machine.
Works as expected there
Looks like even local dev has us waitlisted though 😢

Fixed in https://github.com/githubnext/blocks-template/commit/246887e28444c326185fa8e1fb958aed1d0ce29b!
The underlying issue was that @primer/react expressed a peer dep of react 17.x, whereas everything else we use relies on react 18. The way yarn writes dependencies to disk was fine (it installs react 18) but npm would "vendor" in the node_modules for primer/react, which included react 17. Subsequent attempts to load react-dom/client would fail.
Thank you for the bug report!