Open sanjarani opened 10 months ago
keytar
and win-dpapi
are required on Windows https://github.com/bertrandom/chrome-cookies-secure/blob/8eeca6d405527327f30d95801ec048d38deaee1e/package.json#L38-L41
Install via npm install keytar win-dpapi
Yeah it would be good to have a way to declare and install "platform dependencies", but I don't think it's possible to declare these in package.json
even now hence https://github.com/npm/rfcs/discussions/120.
Therefore certain dependencies that are platform specific are listed as optional only.
If anyone else is receiving the error and already installed the dependencies and you are using electron, you need to rebuild the native modules after execute the npm install
with the following commands:
npm install --save-dev @electron/rebuild
.\node_modules\.bin\electron-rebuild.cmd
here more details: https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules
Looks like a separate dependency issue? Presumably electron has a different edge case to the machine operating system? I've got no experience with electron so can't comment much on that.
Perhaps this repo should publish individual packages for the separate operating systems. The core logic could be shared but edge case dependencies could be handled in their own package.json files and made available separately on npm.
keytar
andwin-dpapi
are required on WindowsInstall via
npm install keytar win-dpapi
keytar
is actually only required on MacOS https://github.com/bertrandom/chrome-cookies-secure/blob/8eeca6d405527327f30d95801ec048d38deaee1e/index.js#L59
https://github.com/bertrandom/chrome-cookies-secure/pull/60
Could be a solution. Welcome thoughts on it.
Add README guidance in https://github.com/bertrandom/chrome-cookies-secure/pull/61/files
I'm uisng this package with
puppeteer
.This is
package.json
file:And this is my code from sample:
And I have this error:
index.js from `node-modules/chrome-cookies-secure/index.js:
line 368: