Git Product home page Git Product logo

Comments (6)

frandiox avatar frandiox commented on June 7, 2024

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.

m4rvr avatar m4rvr commented on June 7, 2024

@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.

frandiox avatar frandiox commented on June 7, 2024

@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.

plashenkov avatar plashenkov commented on June 7, 2024

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.

frandiox avatar frandiox commented on June 7, 2024

@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.

plashenkov avatar plashenkov commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.