Comments (6)
Hi! I haven't seen this error before. Can you provide a small repro? Does it also happen without SSR? (with vite dev
instead of vite-ssr dev
)
from vite-ssr.
@frandiox I just checked the issue again and it only happens when new dependencies were found. If I run vite-ssr
it always finds new dependencies, even if vite has already detected and cached them. When I run vite
(non-ssr mode) it detects those dependencies again but after that running vite-ssr
works fine. Can you somehow check that or do you know why this happens, does vite-ssr not registers the new dependencies correctly?
Otherwise I will create a small repro for it to check. π
from vite-ssr.
@MarvinRudolph vite-ssr
is just calling vite
internally after adding a plugin and a couple of environment variables, so it shouldn't be interfering with Vite's logic too much. A small repro would definitely be helpful!
from vite-ssr.
Yup, I am seeing the similar warning too. It also outputs "unrestricted file system access" message before this warning:
Unrestricted file system access to "/node_modules/.vite/chunk-2NVDVNTV.js"
For security concerns, accessing files outside of serving allow list will be restricted by default in the future version of Vite. Refer to https://vitejs.dev/config/#server-fs-allow for more details.
[Vue Router warn]: No match found for location with path "/node_modules/.vite/chunk-2NVDVNTV.js?v=1314ab95"
I.e. it creates the cache itself and then swears at it :)
It's hard to say where this issue comes from. I couldn't get it from vite yet, only vite-ssr. But I am not sure.
from vite-ssr.
@plashenkov The "unrestricted file system access" is a check added in a recent version of Vite, where you can't read any file outside of your root project.
If your code is similar to the examples of this repo, where projects import API mocks from outside, you'll need to add extra config.
Other than that, I'm not able to reproduce that Vue Router warning π€
from vite-ssr.
Hi @frandiox!
Yes, I understand that this is Vite's check.
My project imports nothing from outside, it is intentionally simple for now β just one page, no API calls.
I guess it creates a cache in node_modules/.vite
folder, then later it tries to load something from it and shows this message β maybe because node_modules/.vite
is outside of my src
folder? My index.html
points to src/app.js
.
Other than that, I'm not able to reproduce that Vue Router warning
The only one page in my project uses a dynamic import:
export default [
{path: '/', component: () => import('src/pages/MainPage.vue')},
]
Maybe this is the main nuance. And I get this error not every time, but from time to time. Also, I think that it may be important not to use the --force
flag. I am not sure though.
from vite-ssr.
Related Issues (20)
- Cannot read property 'ssrUtils' of undefined HOT 1
- Add support for streaming
- vueuse/head version
- δΈι’ζ―ζηζ₯ιδΏ‘ζ― δΉεθΏθ½η¨η°ε¨ε°±δΈθ‘δΊ HOT 6
- vite-ssr doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix. HOT 1
- vite-ssr build runs in development mode HOT 2
- vire-ssr has unmet peer dependency warnings
- Internal server error: render is not a function HOT 1
- Error isFunction is not a function from defineComponent called from ClientOnly component. HOT 2
- Unable to request data to set header title in hook function 'onServerPrefetch', page has already completed rendering before await HOT 1
- @vueuse/head 1.x versions Rendering problem
- What should I do if the client repeatedly renders after SSR?
- How to get request headers in Vercel HOT 1
- Bug: bad SSR index.html rendering. HOT 1
- Vue on client don't start lifecycle. HOT 1
- Failed to load url __vite-optional-peer-dep:@vueuse/head:vite-ssr HOT 1
- name export commafy not found
- Does this repo support code splitting?
- Vite 5 support HOT 3
- __DEV__ Vite config define breaks @elastic/apm-rum-core.
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 vite-ssr.