Git Product home page Git Product logo

Comments (9)

josep11 avatar josep11 commented on August 22, 2024

If I manually install keytar with npm i keytar then it works.
I am using Mac OS X Monterrey 12.3.1
And I see it is declared as an optional dependency. Perhaps it should be declared as a peer dependency?

from chrome-cookies-secure.

rubengmurray avatar rubengmurray commented on August 22, 2024

What Node version? Seems OK to me running a very simplified version on Node 10.22.0.

keytar is only used in the context of darwin/mac in the codebase so it's redundant for other OS but it would be interesting to know which Node version, I'm also on Monterey 12.3.1

from chrome-cookies-secure.

josep11 avatar josep11 commented on August 22, 2024

Oh sorry, I forgot to share the Node version. It is 16.14.0.

And it is so strange, now I created a new project from scratch with chrome-cookies-secure version 1.3.4 and it was working ...
I don't know the nitty gritty of how optional dependencies get handled but clearly here it did a strange job. I need to say that in the original project I had version 1.3.2 from the beginning, then I bumped into 1.3.3, whereas in this new project from scratch I started straight away from version 1.3.4.

Thanks for the support!

from chrome-cookies-secure.

rubengmurray avatar rubengmurray commented on August 22, 2024

From the documentation I can find, optionalDependencies - if for some reason they fail to install - do not block the overall install pipeline and npm will carry on as if nothing happened:

https://docs.npmjs.com/cli/v7/configuring-npm/package-json#optionaldependencies

keytar is only required for process.platform === darwin so if it fails to install on windows or linux, that's fine, but when it fails on macOS that's just not going to work.

We also have win-dpapi where the same would apply to windows

I'm not sure on the technicalities of making certain dependencies required only on certain operating systems, but it seems safer at least to just move these to dependencies to eradicate the possibility of this happening.

from chrome-cookies-secure.

rubengmurray avatar rubengmurray commented on August 22, 2024

I've created a draft PR for this here #44 (comment) which should do the trick.

from chrome-cookies-secure.

rubengmurray avatar rubengmurray commented on August 22, 2024

Turns out moving at least one of these (win-dpapi) to dependencies completely breaks the install on macOS. npm i complains that the required dependency does not fit the platform.

I've reverted to optionalDependencies.

from chrome-cookies-secure.

rubengmurray avatar rubengmurray commented on August 22, 2024

@josep11 have you run into this problem since?

from chrome-cookies-secure.

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.