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

Vitest crash when editing imported file #369

Closed
4 tasks done
VictorCarrDev opened this issue May 2, 2024 · 1 comment
Closed
4 tasks done

Vitest crash when editing imported file #369

VictorCarrDev opened this issue May 2, 2024 · 1 comment

Comments

@VictorCarrDev
Copy link

Describe the bug

Whenever i update a file that is being imported in any test it will crash automatically

Reproduction

Editing a file that is being imported will make it crash

Further info: i am using Node.js v18.16.1, Svelte kit and have auto save enabled in vscode

Output

Error: ENOENT: no such file or directory, open '/Users/userPathToProject/.svelte-kit/types/Users/userPathToProject/src/routes/api/user/register/$types.d.ts'
    at Object.openSync (node:fs:601:3)
    at Object.writeFileSync (node:fs:2249:35)
    at update_types (file:///Users/userPathToProject/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:349:5)
    at write_types (file:///Users/userPathToProject/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:150:2)
    at Module.update (file:///Users/userPathToProject/node_modules/@sveltejs/kit/src/core/sync/sync.js:46:8)
    at file:///Users/userPathToProject/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:301:8
    at FSWatcher.<anonymous> (file:///userPathToProject/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:275:5)
    at FSWatcher.emit (node:events:525:35)
    at FSWatcher.emitWithAll (file:///Users/userPathToProject/node_modules/vitest/node_modules/vite/dist/node/chunks/dep-jDlpJiMN.js:45679:8)
    at FSWatcher._emit (file:///Users/userPathToProject/node_modules/vitest/node_modules/vite/dist/node/chunks/dep-jDlpJiMN.js:45771:8) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/userPathToProject/.svelte-kit/types/Users/userPathToProject/src/routes/api/user/register/$types.d.ts'
}

Node.js v18.16.1

(I replaced the the path of the project (with my user) to userPathToProject. but the error is the same)

Version

v0.8.6

Validations

Copy link

github-actions bot commented May 2, 2024

Hello @VictorCarrDev. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants