bluetail
bluetail

Reputation: 183

when npm run dev diagnostics show up [Astro framework]

I'm studying astro framework. I tried some of template and it works great using this command

npm run dev

but I'm having problem with this official template.

https://astro.build/themes/details/astro-paper/

I run npm create astro@latest -- --template satnaing/astro-paper

and type npm run dev

12:41:45 [check] Checking files in watch mode
12:41:47 [content] Types generated 1.29s
√  Getting diagnostics for Astro files in 
C:\Users\mypc\Documents\astro_study\better-belt\…
12:41:52 [diagnostics] Result (19 files):
- 0 errors
- 0 warnings
- 0 hints

I got this message and dev server won't start.

Could some one teach me how to solve this please?

Upvotes: 2

Views: 999

Answers (2)

Anurag Verma
Anurag Verma

Reputation: 121

In order to run the development server in the local system for Astro, you simply need to run the below command in the terminal:

npm run start

Upvotes: 0

The Otterlord
The Otterlord

Reputation: 2195

The template you've linked runs the following command when you run npm run dev.

astro check --watch & astro dev

The & symbol here allows the two commands to run in parallel, but it may not be supported by your terminal/shell. You can safely change the dev command to astro dev in package.json, and things should work normally. Alternatively, in the command line, you can run npx astro dev to run the dev server at any time.

{
  ...
  "scripts": {
    "dev": "astro dev",
    ...
  },
  ...
}

Upvotes: 2

Related Questions