next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Connectivity Issue with the `npx create-next-app --example` command.

Open chof64 opened this issue 3 years ago • 2 comments

Hello, I am having the same issue, however, on mine, the --example points to https://github.com/vercel/next-learn/tree/master/basics/learn-starter as per the tutorial (https://nextjs.org/learn/basics/create-nextjs-app/setup). Screenshot from 2022-07-30 15-32-31

But what I noticed is that all the files from the GitHub repo seem to be downloaded. However, dependencies are not installed.

So with the assumption of all the files are fully downloaded, I just manually run npm install to install dependencies. And proceeded to run npm run dev` to start the dev server. And it worked! Screenshot from 2022-07-30 15-41-59

It seems that there's some bug in the script that even though it already downloaded the repo, returns an error even though the download is complete. And with this error, the rest of the script (dependency installation) is not run.

Originally posted by @chof64 in https://github.com/vercel/next.js/discussions/24802#discussioncomment-3285830

chof64 avatar Jul 30 '22 07:07 chof64

image

The bottom link is to a readme page with the recommendation to use

npm init next-app nextjs-blog

instead

IntroJoul avatar Jul 31 '22 12:07 IntroJoul

Related to #39321

jeferson-sb avatar Aug 09 '22 19:08 jeferson-sb

@chof64 could you verify which Node.js version you are on? As pointed out above, we are tracking an upstream issue in #39321 that might be the same issue that you have.

balazsorban44 avatar Sep 02 '22 11:09 balazsorban44

I am having the same or similar issue

npx create-next-app@latest --example with-jest first-test

returns


? Could not download "with-jest" because of a connectivity issue between your machine and GitHub.
✔ Could not download "with-jest" because of a connectivity issue between your machine and GitHub.
Do you want to use the default template instead? … yes
The directory with-jest-app contains files that could conflict:

node version : v18.7.0

stuartrapop avatar Sep 02 '22 12:09 stuartrapop

Closing in favor of #39321 as this is very likely the same issue. I opened a PR #40182 to fix this. If you have any comments, please add it to #39321

balazsorban44 avatar Sep 02 '22 16:09 balazsorban44

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

github-actions[bot] avatar Oct 03 '22 00:10 github-actions[bot]