Astro npm run dev does not work

Hi everyone,

As the main subject says, when i first start a new Astro project, with the following installation options steps:
1- npm create astro@latest
2- Choose a directory name "example"
3- How would you like to start your new project: empty
4- Do you plan to write Typescript: No
5- Install dependencies?: Yes
6- Initialize a new Git repo: No

Once everything installed:
7- cd into "example"
8- run "npm run dev"

And i've got the uploaded image error message.

I've found out a fix, if i run "npm install typescript" or "npm install --dev typescript@latest " in the folder project, and then run "npm run dev" it WORKS !!!.
It works if i choose in the installation process that i want to use typescript too.

But i shouldn't do this, because it should work out of the box, without manually installing typescript modules.

So here i am, i don't really understand why i can't run the project without typescript normally, as it should.

Hope i was clear enough.

Thank you for your time and read this !!!
image.png
Was this page helpful?