Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codespaces not working with "Use Template" (workaround: clone/fork/duplicate repo) #2030

Open
raffertyuy opened this issue Feb 22, 2023 · 5 comments

Comments

@raffertyuy
Copy link

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

@koistya
Copy link
Member

koistya commented Feb 22, 2023

@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.

@raffertyuy
Copy link
Author

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!

@koistya
Copy link
Member

koistya commented Feb 24, 2023

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:

"start": "zx ./scripts/start.js",

@raffertyuy
Copy link
Author

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
Copy link
Author

raffertyuy commented Feb 26, 2023

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 raffertyuy changed the title Codespaces Starter Issue Codespaces not working with "Use Template" Mar 13, 2023
@raffertyuy raffertyuy changed the title Codespaces not working with "Use Template" Codespaces not working with "Use Template" (workaround: clone/fork/duplicate repo) Mar 13, 2023
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

No branches or pull requests

2 participants