-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
create-astro does not work #5227
Comments
Hey @ScriptRaccoon I'd love to help narrow this down. I'm curious if the same command works for you when using an earlier version of Node, like |
Since it seems like the I opened #5240 to make these failures a bit more obvious, but I'm still not sure what could be causing the |
I can try this. How can I execute create-astro with another Node version (without uninstalling my current Node version)? |
If you're not using something like https://github.com/nvm-sh/nvm or https://volta.sh/ you would have to uninstall your current version and install the older one. No worries if that's too much. |
Experiencing the same problem, but only in Windows PowerShell. It just gets stuck after "where would you like to create your project?" Tried on Ubuntu, no problem there, prompts/dialog works fine and creates the project. Only seems to be an issue in Windows. Node v.18.12.0 on both machines. |
the same problem on my machine with node v18.1.0, |
The tool works on my machine when Node 16.0.0 is installed. But it still asks the question where to create the project (i.e. the folder) twice and then takes the first letter of the first answer combined with the second answer. So when you just press Enter another time (what I first did), you only get one letter.
|
I had the same problem in linux. i fix it updating node to the last lts version. it seems that in the process of testing pnpm with astro i had corepack enable, then the error appear. i was usign node 18.0.0 that use pnpm 6.0 and the last version is 7.14 at this moment that caused that neither npm or pnpm to be able complete create astro@latest |
I'am also having an issue on windows 10. node v16.18.0 npm create astro@latest
npm WARN exec The following package was not found and will be installed: [email protected]
+—————+ Houston:
| ^ u ^ Let's create a new project!
+—————+
astro v1.6.1 Launch sequence initiated.
? Where would you like to create your new project? » ./laughable-luminosityfile:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:1
process.stdin.setRawMode(false);
^
TypeError: process.stdin.setRawMode is not a function
at done (file:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:14:23)
at say (file:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:81:5)
at async main (file:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/create-astro/dist/index.js:78:5)
``` npm create astro
npm WARN exec The following package was not found and will be installed: [email protected]
+—————+ Houston:
| ^ u ^ Let's create a new project!
+—————+
astro v1.6.1 Launch sequence initiated.
? Where would you like to create your new project? » ./laughable-luminosityfile:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:1
process.stdin.setRawMode(false);
^
TypeError: process.stdin.setRawMode is not a function
at done (file:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:14:23)
at say (file:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:81:5)
at async main (file:///C:/Users/<username>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/create-astro/dist/index.js:78:5)
|
The Example bash: yarn create astro fresh-app --template basics --install --git=false --typescript=strict < /dev/null |
Does this issue occur with prior versions of pnpm create [email protected] Quick reference:
|
@mrienstra It started occurring in v1.2.0. I'm maintaining Fresh App Factory, a project that runs generator scripts every day and publish the generated project as GitHub template repositories (here's a fresh-astro-project). The Astro project generation script stopped working 6 days ago. |
@dtinth, thanks! primer/brand#113 is saying the same thing (v1.1 working, v1.2 broken). I forgot to mention that before. I was asking in case there are multiple issues being discussed here. |
|
OK, quite a few issues happening here... 1A. I've had a hard time tracking down what could be going on here. If anyone can nail down a reproduction that would be very helpful. 1B + 1C. Seems like this might have something to do with If anyone who is experiencing bugginess on Windows could try running the command again with 1D. |
@natemoo-re, about the 1D scenario with the But as you said:
Just wanted to give feedback. ...
√ How would you like to setup TypeScript? » Strictest
√ TypeScript settings applied!
next Liftoff confirmed. Explore your project!
Enter your project directory using cd ./shaky-sphere
Run npm run dev to start the dev server. CTRL+C to stop.
Add frameworks like react or tailwind using astro add.
Stuck? Join us at https://astro.build/chat
+—————+ Houston:
| ^ u ^ Good luck out there, astronaut!
+—————+
file:///C:/Users/<user>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:14
process.stdin.setRawMode(false);
^
TypeError: process.stdin.setRawMode is not a function
at done (file:///C:/Users/<user>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:14:23)
at say (file:///C:/Users/<user>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/@astrojs/cli-kit/dist/messages/index.js:81:5)
at async main (file:///C:/Users/<user>/scoop/persist/nodejs-lts/cache/_npx/57e9a3bcc0672894/node_modules/create-astro/dist/index.js:297:3)
|
OK a few fixes landed in #5319 but I'm still stuck without reproductions on a few of the other ones. Luckily I have a Windows machine on the way, so hopefully I can track these down myself once that's here. |
Great! With v1.6.7 the primary error does not appear anymore (on my PC, at least). Only the name question is still buggy:
works as expected. However, as before,
asks me for the project name twice concatenates the first letter of the first answer with the full second answer.
|
Interesting, thanks for the update! That should help me narrow things down. |
@natemoo-re, possibly related: Running UPDATE: This only happens when pressing |
I was also getting the same error as the original issue reported but on MacOS Ventura 13.0 and Node v18.2.0. The error is pretty much the same as the original post:
This was fixed using NVM to use Node 16 to run the installer. |
@natemoo-re It always fails on this command |
@natemoo-re I tried your post, but I met the same error.
Here is my env. Node v18.1.0 (I use nodenv) Thank you! |
Any chance running the command as Alternatively, upgrading If everything continues to fail, a full screen recording would be the most helpful way to debug this. |
Hi, I tried all of them in this post, but not work well. It seems to work well, but astro directory was not created. Node 18.8.0 (I use nodenv) |
This was automatically closed by my merge. Reopening. |
Do both of you have Can you try to run the following command?
|
I tried, but the error is keeping... Here is my error and git version. |
Might be time to close this and open new issues, as I just tried I then ran Also ran across this weird bug: #6166 ... Otherwise working well for me! |
Very interesting, thanks for investigating @mrienstra! I definitely agree with closing this issue since it's been running for quite a long time and we're discussing entirely different problems at this point. Since this command is failing for @YUUSUKE18 and @TheNormandyProject...
That leads me to believe that the underlying issue with the I unfortunately don't think there's anything we're able to do on our end, short of switching to another project downloader or building our own, which we'd like to avoid. |
Closing is OK for me, since the errors from the first post do not happen anymore (Windows 10, Node v18.12.0). |
Thank your for your support. I checked this problem.
My co-worker env is Mac Monterey. That's why he tried commands in this topic. |
@YUUSUKE18 & @TheNormandyProject, the error you both get when running
Latest PS: well off topic, but @YUUSUKE18, according to this, you may want to use a newer version of edit: added to table as per comment below |
I use |
I worked around this by using Node 16.16.0 for project creation and switch back to Node 18.2.0. |
@pontakornth, can you provide a little more detail? How did it fail on Node 18.2.0? If you haven't already, can you try running the following (as per this comment) using Node 18.2.0 to see if it fails as well?
|
Another work around would be to install astro manually. Works with the latest version of node. |
I have been having exactly the same issues as outlined in this thread. Having tried pretty much everything suggested here, I finally got to the end of the thread just as you suggested doing a manual install. I have tried it, and I have finally been able to set up and run dev. Thanks for the suggestion @tinus-bot Update - I just tried a fresh installation to see if anything had changed. I got the same error |
╭─────╮ Houston: astro v2.1.7 Launch sequence initiated. dir Where should we create your new project? tmpl How would you like to start your new project? pnpm: Command failed with exit code 1: create-astro |
the install finally worked with npm create astro@next--refactor command. Thank you |
Thanks all for taking the time to post here! I've just been playing with
|
same problem with Node.js v18.16.1 and [email protected] |
Hey @natemoo-re 👇🏻 DEV env: To create a new Astro project using the automated CLI I used the commands: ...and when they do not throw privilege error they simply fail by displaying the ENOTEMPTY code. I cleaned cache before and after the execution of each, tested in completely empty directories/partitions, updated, reinstalled Node and P/NPM via FNM without any results. Attached images on the execution of the different commands and log. PS: with this same dev env I have created projects of React, Tailwind + daisyUI, Vue on Node without any problem, however Astro still resists. |
I have the same issues with next env on windows 11: The only solution that I found it was install manually astro as @honkingeagle said
|
@mahindev-ai fixed by simply installing NVM for Windows |
What version of
astro
are you using?1.6.0
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows 10 Pro for Workstations
Describe the Bug
When I run
npm create astro@latest
and follow the instructions, I get the following error and the installation fails:2022-10-28T11_04_46_771Z-debug-0.log
It is also strange that, after answering the question about the location and press Enter, I need to press Enter again, it then takes the first letter of my answer only. It seems to ask the same question twice.
The same error happens when I use command line with administrator rights, Window's Powershell, and Git Bash.
Node version: v18.2.0
Git version: git version 2.38.1.windows.1
Sorry, I cannot add a minimal reproducible example here since the starter templates already have astro installed.
I can install astro manually as a depencency to a project and work with it. Only the installation wizard fails to work.
Link to Minimal Reproducible Example
sorry, left blank
Participation
The text was updated successfully, but these errors were encountered: