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

Dependencies installing with npm... error: Request timed out after one minute #6600

Closed
1 task
WintrCodes opened this issue Mar 20, 2023 · 17 comments · Fixed by #7052
Closed
1 task

Dependencies installing with npm... error: Request timed out after one minute #6600

WintrCodes opened this issue Mar 20, 2023 · 17 comments · Fixed by #7052
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@WintrCodes
Copy link

WintrCodes commented Mar 20, 2023

What version of astro are you using?

2.1.3

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac and Windows

What browser are you using?

N/A

Describe the Bug

When creating a new Astro project via 'npm create astro@latest', installing deps via the interactive CLI times out if you select 'yes' to install deps.

Edit: This screenshot is from another user mentioned below - logs have been requested in Discord
image

Workaround was to select 'no' and run 'npm i' after switching to the directory

Happened on Windows and MacOS Ventura

Requesting logs from Discord user (Peak)

Discord thread:
https://discordapp.com/channels/830184174198718474/1086276455773778020

Link to Minimal Reproducible Example

Unable to replicate in StackBlitz

Participation

  • I am willing to submit a pull request for this issue.
@bluwy
Copy link
Member

bluwy commented Mar 20, 2023

Looks like it's coming from:

setTimeout(() => reject(`Request timed out after one minute`), 60_000);

Maybe it's because the npm install actually took more than a minute to finish? Does that happen when you run npm i separately?

@ematipico
Copy link
Member

@WintrCodes, if you could share the contents of the npm logs, that would be amazing. It could help us understand what's the underlying issue.

@WintrCodes
Copy link
Author

Looks like it's coming from:

setTimeout(() => reject(`Request timed out after one minute`), 60_000);

Maybe it's because the npm install actually took more than a minute to finish? Does that happen when you run npm i separately?

When running npm i outside of the installer CLI, it installed with zero issue

@WintrCodes
Copy link
Author

I couldn't find the npm logs on my Mac; if someone knows where they'll be, I'll double check!

I couldn't find the npm logs on my Mac; if someone knows where they'll be, I'll double check!

@ematipico
Copy link
Member

ematipico commented Mar 20, 2023

I couldn't find the npm logs on my Mac; if someone knows where they'll be, I'll double check!

I couldn't find the npm logs on my Mac; if someone knows where they'll be, I'll double check!

If you check the screenshot you shared, the error gives you a path to where npm/pnpm storer error logs.

@WintrCodes
Copy link
Author

WintrCodes commented Mar 20, 2023

I couldn't find the npm logs on my Mac; if someone knows where they'll be, I'll double check!

If you check the screenshot you shared, the error gives you a path to where npm/pnpm storer error logs.

The screenshot is from another user in Discord and on a Windows device. I asked them (in the thread) to provide the log
edit: added a note to the original submission about the screenshot being from another user

@abcpeak
Copy link

abcpeak commented Mar 21, 2023

I test it again, This the entire NPM error log!
2023-03-21T14_54_03_678Z-debug-0.log

@matthewp matthewp added the - P3: minor bug An edge case that only affects very specific usage (priority) label Mar 24, 2023
@KickAgency
Copy link

KickAgency commented Mar 29, 2023

I just ran into this issue on my first attempt of trying out Astro.

Deleting the project and running the create command again worked.

image

@anand007s
Copy link

I am also facing the same issue

@luiseduardoaugusto
Copy link

I found that i was running a dev server in another terminal. close that an try again

@akinors
Copy link

akinors commented Apr 17, 2023

I had the same problem using with powershell, but after i switched to CMD it worked.

@prantikseal
Copy link

didnt work for me :(

@jooemrp
Copy link

jooemrp commented May 10, 2023

image

I choose "no" when asked "install dependencies?"
and manually doing npm i works for me.

reify:typescript: timing reifyNode:node_modules/shiki Completed in 142832ms <-- looks like this part is the reason why install dependencies timeout.

@bluwy
Copy link
Member

bluwy commented May 10, 2023

I guess an easier fix for now is to extend the the reject timeout to 2 or 3 minutes, but at 1 min we can log that "it's taking a while".

@ematipico
Copy link
Member

ematipico commented May 10, 2023

Since Astro is not in control of external factors (problems with the network, issues with npm, etc.), I believe we shouldn't fail if the dependencies failed to install. We should log a message saying "Astro couldn't install the dependencies, please install them yourselves cd project/ && npm i", or something like that, and continue the process

@technologyconsulting
Copy link

I'm now running into this using the latest version of Astro. Whilst running npm i works this isn't a fix as the docs don't mention it as the default / must do thing to get up and running.

I am trying Astro for the first time and problems on initial 'basic' setup is the last thing I wish to see.

@HarryAdney
Copy link

Yeah, I'm getting this too on Windows 10 (I know, don't judge me).

Tried again following advice here - say no to installing dependencies and installing seperately works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.