Giter VIP home page Giter VIP logo

Comments (3)

bendrucker avatar bendrucker commented on July 29, 2024

If you are overriding a dependency of a module in your project, by definition that is not a peer dependency.

If you are overriding a transitive dependency that requires the @global option.

If that's not the issue we'll need a fully reproducible example.

from proxyquire.

jankapunkt avatar jankapunkt commented on July 29, 2024

If you are overriding a dependency of a module in your project, by definition that is not a peer dependency.

What is then a peer dependency by definition?

If you are overriding a transitive dependency that requires the @global option.

It's not transitive.

If that's not the issue we'll need a fully reproducible example.

You can reproduce the above with any setup that has npmmodule (placeholder; take any module you like) it in peerDependencies in package.json and not being installed, thus not being present in node_modules.

Why you just closed it after replying with a non-answer? This is not some kind of please give me full instructions kind-of question. I read the docs and I tried the things but I just don't see, why stubbing a module, that is simply not present, is not possible. Maybe I just don't understand the require system enough but at least you could give me a hint here.

from proxyquire.

bendrucker avatar bendrucker commented on July 29, 2024

A peer dependency is a dependency of another npm package you depend on. By definition, a module that you require relatively cannot directly require a peer dependency.

Given the above, this seems like a support/usage issue. If you can demonstrate a bug through runnable code I will of course reopen. Argumentativeness will not be tolerated though.

from proxyquire.

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.