-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
SSR:Error: ENOENT: no such file or directory, open 'xxx/src/views/module.tsx' #3120
Comments
vesion below 2.0.3 is no problem |
expectation: acceleration,Come on, gogogo |
solved |
It is really helpful for other folks to read a "how was it solved" when they searching for the same issue. |
This problem is not the cause of vite, it is the cause of typescript configuration, because jsx-vue does not support decorators and adds typescript and babel plugins. In fact, vite itself supports ts and babel, so you only need to add babel to decorators. Just support it. No need to introduce additional typescript plugins |
If someone encounters the same problem and has not solved it in the way mentioned above, you can comment here |
my project can run |
This question has nothing to do with the discussion |
Describe the bug
in ssr render fail.
error info:
Reproduction
bug store: https://github.com/KellerLong/vue-fix
System Info
windows(wsl 1.0)
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: yarn
Logs
babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packag
es/babel#babelhelpers
babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packag
es/babel#babelhelpers
Pre-bundling dependencies:
vue
vue-router
vue-decorator
(this will be run only when your dependencies or config have changed)
[Error: ENOENT: no such file or directory, open '/mnt/c/Users/kevin/Projects/test/vue-fix/src/views/module.tsx'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/mnt/c/Users/kevin/Projects/test/vue-fix/src/views/module.tsx'
}
Error: Couldn't resolve component "default" at "/"
at /mnt/c/Users/kevin/Projects/test/vue-fix/node_modules/vue-router/dist/vue-router.cjs.js:1998:47
at async render (/mnt/c/Users/kevin/Projects/test/vue-fix/src/entry-server.ts:8:10)
at async /mnt/c/Users/kevin/Projects/test/vue-fix/server/app.js:36:29
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: