Comments (10)
I would suggest this is not a minor bug.
The same thing happens while running pnpm dev in sveltekit project and when hmr reloads a file eg:
src/routes/api/someroute/[id]/+page.server.ts
The extension crashes with an error saying: 'src/routes/api/someroute/[id]/+page.server.ts' is not available.
Then it just hangs. No way of resetting or restarting. The only way is to close vscode and reopen.
It's very annoying, and basically makes the extension unusable. So hence my suggestion this is NOT a minor bug.
You end up being stuck with spinner and "Resolving Vitest" and no way to "hard reset" or do something. Surely that must be an option?
Full output of the error:
Error: ENOENT: no such file or directory, open 'src/routes/app/someroute/[id]/+page.server.ts'
at Object.readFileSync (node:fs:453:20)
at createProxy (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:519:31)
at ensureProxies (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:505:20)
at process_node (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:380:2)
at update_types (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:250:7)
at write_types (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js:150:2)
at Module.update (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/core/sync/sync.js:48:8)
at file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:317:8
at FSWatcher.<anonymous> (file:///project/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@types+node_kksg7dl7df63ve4rt7ijxpt6ti/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:291:5)
at FSWatcher.emit (node:events:530:35) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'src/routes/app/someroute/[id]/+page.server.ts'
}
from vscode.
This should be fixed for everyone in 0.12.0.
from vscode.
thanks a lot for the quick fix
it seems to be working for me
from vscode.
Well It seems the error is happening in my source code somewhere when it's running app.use(serveStatic(app.get('public')))
,
which seems to get some config, and that config is not loaded
and it seems the reason is that the working directory of the extension is not at the project, but somewhere in vscode folder in appdata
what can I do to set working directory to my project ?
from vscode.
I'm getting the same problem. This happens because you are rerunning the tests too quickly after changing the test file. You'll have to wait a bit, 5 seconds or so, after changing the file. I can reproduce this everytime if rerunning quickly after changing test files.
This might be a Windows only issue though.
from vscode.
This might be windows only, but the problem is not being too quickly, it outright crashes, because the working directory is set to somewhere other than the project
from vscode.
Yes I've also observed the cwd being incorrect which caused my test suite to fail. I could bypass that issue by finding the correct project folder by traversing backwards from __dirname
but it's not elegant. For me, when I rerun the tests quickly after changing the test file, the test looks like they are running because a small loader appears in the top of the test explorer pane, but no test actually runs I think, because no console logs are recorded. I've never had vscode outright crash on me though.
from vscode.
I need some kind of reproduction that I can install and run to see the error by myself.
from vscode.
Then it just hangs. No way of resetting or restarting. The only way is to close vscode and reopen.
There is a "Refresh" button that should work:
If it doesn't, I will need a reproduction to see why.
from vscode.
The potential fix is released in v0.11.0 - this is a pre-release version and you might need to enable it manually:
Please let me know if it fixes your issue.
from vscode.
Related Issues (20)
- Always displaying vitest error on startup HOT 2
- Crash at startup on Windows when using Yarn PnP
- vitest plugin keeps a file lock on rollup and esbuild which halts package upgrades at times HOT 7
- Can´t modify directory tree HOT 1
- Vitest fails to start if a compiled config is available
- No test output when debugging HOT 7
- Vitest failes to start in vscode >=1.90 when using Yarn PnP HOT 6
- Open VSX Registry (VSCodium) forcing outdated version (1.0.0-beta.X) HOT 7
- Vitest failed to start error on .d.ts files with v0.12.4
- Vitest process exited with exit code null HOT 2
- Color indicator of failing tests in Explorer and Tab Bar
- Debugger grinds to a halt with large unrelated files present HOT 1
- Debugging test regression after 0.10.7 HOT 3
- Error: Cannot find module @rollup/rollup-darwin-x64 on MAC with M3 processor HOT 7
- Plugin keeps iterating across port numbers HOT 1
- Errors during tests don't get reported correctly
- Vitest plugin fails to run tests in a monorepo with app-specific config HOT 2
- Crashes with "Cannot find module"
- `Run all Tests` doesn't create any ui/visual elements anymore
- Add "Turn on continous run" option to the right click menu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.