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

Don't crash when tsconfig.json is modified #7835

Closed
1 task
kanashimia opened this issue Jul 27, 2023 · 0 comments · Fixed by #8736
Closed
1 task

Don't crash when tsconfig.json is modified #7835

kanashimia opened this issue Jul 27, 2023 · 0 comments · Fixed by #8736
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@kanashimia
Copy link
Contributor

What version of astro are you using?

2.9.3

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

None

What package manager are you using?

npm, pnpm, bun (yes, all of them)

What operating system are you using?

Linux

What browser are you using?

Chromium

Describe the Bug

On some projects dev server will crash if you modify tsconfig.json.
This doesn't seem to happen on the minimal example in stackblitz.

To reproduce:

  1. open stackblitz example
  2. try to modify tsconfig.json in any way.
  3. observe crash
~/projects/xorinjgpp.github
❯ npm install && npm run dev
12:56:29 [astro] update /tsconfig.json
12:56:29 [astro] Configuration updated. Restarting...

Error: The server is being restarted or closed. Request is outdated
    at throwClosedServerError (file:///home/projects/xorinjgpp.github/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:43808:17)
    at Object.resolveId (file:///home/projects/xorinjgpp.github/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:44206:21)
    at ModuleGraph.eval [as resolveId] (file:///home/projects/xorinjgpp.github/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:64976:65)
    at ModuleGraph._resolveUrl (file:///home/projects/xorinjgpp.github/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:64936:57)
    at ModuleGraph.getModuleByUrl (file:///home/projects/xorinjgpp.github/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:64714:34)
    at FSWatcher.eval (file:///home/projects/xorinjgpp.github/node_modules/astro/dist/content/vite-plugin-content-imports.js:129:58) {
  code: 'ERR_CLOSED_SERVER'
}

What's the expected result?

Server still running.

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog?file=tsconfig.json&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 27, 2023
@Princesseuh Princesseuh added - P4: important Violate documented behavior or significantly impacts performance (priority) and removed needs triage Issue needs to be triaged labels Jul 31, 2023
@bluwy bluwy self-assigned this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants