GithubHelp home page GithubHelp logo

Comments (7)

antfu avatar antfu commented on May 29, 2024

If you don't enable hoist, then you need to install Vue and allow runtime deps explicitly on the top-level. I think there is something we could do to improve that. If so, PR welcome :)

from slidev.

cdtut avatar cdtut commented on May 29, 2024

I installed Vue now getting [vite] Internal server error: Failed to resolve import "@unocss/reset/tailwind.css" from "../../../../../../@slidev/styles". Does the file exist?

Starting dev I get lots of lines like Failed to resolve dependency: @antfu/utils, present in 'optimizeDeps.include'

Can you tell me which deps to install manually? I can do PR for documentation.

allow runtime deps explicitly on the top-level

How to do this?

from slidev.

antfu avatar antfu commented on May 29, 2024

Bascially means you need to install @unocss/reset and @antfu/utils as well - and then try again, repeat that until you see no errors - in general turn on hoist would save you from this otherwise you need to hoist yourself

from slidev.

cdtut avatar cdtut commented on May 29, 2024

What you meant by "allow runtime deps explicitly on the top-level"? Is that workaround to avoid all this until it is made in better way?

Failed to resolve dependency: @antfu/utils, present in 'optimizeDeps.include'
Failed to resolve dependency: @slidev/parser, present in 'optimizeDeps.include'
Failed to resolve dependency: @unhead/vue, present in 'optimizeDeps.include'
Failed to resolve dependency: @vueuse/math, present in 'optimizeDeps.include'
Failed to resolve dependency: @vueuse/motion, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror, present in 'optimizeDeps.include'
Failed to resolve dependency: defu, present in 'optimizeDeps.include'
Failed to resolve dependency: drauu, present in 'optimizeDeps.include'
Failed to resolve dependency: file-saver, present in 'optimizeDeps.include'
Failed to resolve dependency: fuse.js, present in 'optimizeDeps.include'
Failed to resolve dependency: js-base64, present in 'optimizeDeps.include'
Failed to resolve dependency: js-yaml, present in 'optimizeDeps.include'
Failed to resolve dependency: katex, present in 'optimizeDeps.include'
Failed to resolve dependency: monaco-editor, present in 'optimizeDeps.include'
Failed to resolve dependency: nanoid, present in 'optimizeDeps.include'
Failed to resolve dependency: recordrtc, present in 'optimizeDeps.include'
Failed to resolve dependency: resolve, present in 'optimizeDeps.include'
Failed to resolve dependency: vue-router, present in 'optimizeDeps.include'
Failed to resolve dependency: vue-starport, present in 'optimizeDeps.include'
Failed to resolve dependency: windicss, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror/mode/javascript/javascript, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror/mode/css/css, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror/mode/markdown/markdown, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror/mode/xml/xml, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror/mode/htmlmixed/htmlmixed, present in 'optimizeDeps.include'
Failed to resolve dependency: codemirror/addon/display/placeholder, present in 'optimizeDeps.include'
Failed to resolve dependency: mermaid/dist/mermaid.esm.min.mjs, present in 'optimizeDeps.include'
Failed to resolve dependency: mermaid/dist/mermaid.esm.mjs, present in 'optimizeDeps.include'
Failed to resolve dependency: vite-plugin-vue-server-ref/client, present in 'optimizeDeps.include'

I am not going to manually install all because it can change each version and it make no sense. Why is slidev so different than all other package that exist? I should only have to care about my dependencies not dependencies of my dependencies!

When I install @slidev/cli it should automatically bring everything it needs. Slidev should work out of box in easiest possible way so people have no problem and dont have to change the policies of monorepo just for one non critical tool. Want to use slidev please can you make it work without hoist?

from slidev.

antfu avatar antfu commented on May 29, 2024

I did list all necessary dependencies in the packages. However, you decided not to enable hoisted, making the deps lie under node_modules/@slidev/client/node_modules but not directly in node_modules, making Vite fail to resolve it. Again, I don't know any workaround I could have, if you do I am open to PRs to improve this situation

from slidev.

cdtut avatar cdtut commented on May 29, 2024

I use lot of vite based products that have lot of dependencies but vite does not have problem to find those in sub directory. They dont need to enable hoisting they work in default way.

Why it works in every product but not slidev? If you can help me understand I can try think solution.

In repo/packages/project/slideproject/node_modules I only see .bin, .vite, @slidev (with cli under it) and playwright-chromium. @slidev/cli and playwright-chromium are the only 2 dependencies I set in package.json.

Shouldn't all dependencies of slidev be in repo/packages/project/slideproject/node_modules or repo/packages/project/slideproject/node_modules/@slidev/cli/node_modules (but there is only .bin there)?

from slidev.

cdtut avatar cdtut commented on May 29, 2024

@antfu Issue closed as completed but commit does not fix it latest version has same problem. It work for you?

from slidev.

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.