#Cannot run astro

57 messages · Page 1 of 1 (latest)

tulip helm
#

When running npm run dev, I get
'astro' is not recognized as an internal or external command,
operable program or batch file.
Node version v18.12.1 is installed on my system with windows 10.
I repeated npm install although it was already done through CLI.
I would be really grateful if somebody could point me on the right direction. 🙂

hard lagoon
#

Is your terminal point to your projects root folder?

tulip helm
#

Yes. terminal is in the same folder. I created astro app on astro101 folder and node_modules and all package.json are in this same folder.

tulip helm
# stable robin npm run dev

did that, and got 'astro' is not recognized as an internal or external command,
operable program or batch file.

stable robin
#

hmmm... thonk_spin

tulip helm
#

I can do npm run in other projects like in sass just fine..and node is v18.12.1

stable robin
#

can you take a sc of vscode?

tulip helm
#

ok

stable robin
#

with your current project

#

i wanna see also the terminal

#

what it is loging

tulip helm
stable robin
#

npm run start

tulip helm
stable robin
#

astro101

#

holds your project right?

tulip helm
#

yes

stable robin
#

did you re run npm install?

tulip helm
#

yes.. will do again

stable robin
#

This error message could basically mean one of two things:

  • The filename of the executable was entered without extension and without the whole path.
  • Windows didn’t find the executable that matched the filename, including its extension, in any directory mentioned in Environment Variables “Path”.
tulip helm
#

did that but same prob again

#

npm run runs fine on other projects though..sud I add anything to env variable?

stable robin
#

i recommend you to bootstrap a new project with astro cli

#

and see if it fixes it.

tulip helm
#

ok but this is my third try..will try another one again

stable robin
#

do you have npm installed globally?

tulip helm
#

yes

#

npm runs on any path

stable robin
#

try

#

npm run build

#

and see if it creates a dist

#

for build

tulip helm
#

astro build

'astro' is not recognized as an internal or external command,
operable program or batch file.

#

does not create dist

tulip helm
stable robin
#

this is an unexpected behavior.

#

still thinking if we're missing something

tulip helm
#

yea, what am I missing? All other stuff I run in my comp is all running fine including npm on other projects..

stable robin
#

i'm not sure how c shell handles binaries

#

tbh

tulip helm
#

thank u so much for trying though, really appreciate it

stable robin
tulip helm
#

yea, me too.. tried with pnpm for a change, same prob

stable robin
#

i use pnpm

tulip helm
#

sud I ditch windows for linux? hmm

stable robin
#

and I haven't ran into that problem yet.

#

I use macOS

tulip helm
#

It's solved, I did a silly mistake of putting ";" in foldername of root folder for uniqueness in finding folder faster.

#

@stable robin Thank you so much for your time..