react-starter-kit icon indicating copy to clipboard operation
react-starter-kit copied to clipboard

GitHub Codespaces fails when using template - requires manual clone/fork

Open raffertyuy opened this issue 3 years ago • 6 comments

The starter kit works great when running on local machine. The initial yarn install and yarn start works perfectly. image

However. the following issues are encounted when running on GitHub codespaces.

  1. yarn install works.
  2. yarn start will run but throws this error
image

image

raffertyuy avatar Feb 22 '23 06:02 raffertyuy

@raffertyuy thanks for the report! But I"m unable to reproduce this issue. Maybe you can try to drop Codeworkspaces VM and create a new one?

I tested with the smallest (2 CPU) Codespaces instance, as well as running the app inside of a DevContainer locally.

koistya avatar Feb 22 '23 12:02 koistya

Hi @koistya , I tried with 2 core and 4 core but didn't work. Now I tried deleting the entire repo and regenerated from scratch. Here are the errors I'm getting.

When starting codespaces, it will prompt to install a bunch of add-ons and then start with this (node version 16.19.0?) image

Since the above included yarn install, I basically tried yarn start, yarn install and yarn start again. I'm getting this zx error, also node version defaults to 19.6.0.

image

This is the forked public repo.

Thank you for the help!

raffertyuy avatar Feb 23 '23 01:02 raffertyuy

Does yarn node ./scripts/start.js work? Or, yarn workspace app start? In that case, we can replace zx ./scripts/start.js with node ./scripts/start.js in the package.json file:

https://github.com/kriasoft/react-starter-kit/blob/906e56240619e12d1ec06f64a20ab18c2816c65d/package.json#L16

koistya avatar Feb 24 '23 16:02 koistya

Hi @koistya , sorry for the late reply.

yarn node ./scripts/start.js and node ./scripts/start.js runs image

but both result to image

raffertyuy avatar Feb 26 '23 13:02 raffertyuy

It appears that the issue is only for repos created through the Template.

The following worked

  1. Running codespaces straight from https://github.com/kriasoft/react-starter-kit will work.
  2. Cloning https://github.com/kriasoft/react-starter-kit and copy files into another repo. Start codespaces from there.

In both of these cases, zx isn't preinstalled, so the following sequence is what worked for me.

  1. yarn install
  2. npm install -g zx
  3. yarn start

After doing a file/folder compare between the template and the main repo, a lot of files are very different. Maybe the template is an older version?

image Left: Code from Template Right: Code from https://github.com/kriasoft/react-starter-kit

Let me know if there's an issue with using the code from the main repo without using the template.

raffertyuy avatar Feb 26 '23 14:02 raffertyuy