Closed Laurenz-M closed 1 year ago
Edit: I have just removed all import references of "crypto" from the node_modules folder of the installed "printify-nodejs" package and vite started without error. Instead of explicitly importing crypto, it it now referenced globally.
//node_modules/printify-nodejs/dist/index.js
(Removed the import and referenced "crypto" like a global class)
//node_modules/printify-nodejs/dist/index.mjs
(Also removed the import)
This removes all my error right now, but i am unsure if everything still works as expected. Maybe you could look into my solution :)
Cheers, Laurenz
Hi, thank you for bringing this up. I will push an update soon which will remove the crypto dependency from npm.
Removing the crypto npm dependency in pr #24 It now imports the crypto package built into Node. And just to be clear, this api wrapper isn't meant to be used in the browser.
Don't hesitate to open another issue or re-open this one if there's something unclear still.
Hey everyone! I have just installed your package via npm but I am getting an error regarding the "crypto" package that this project depends on. The error is as follows:
Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json.
I am using the newest version of vite for my project. I am happy to provide further information if neccessary.
I suspect that this issue comes from the "crypto" package, that wa discontinued and integrated directly into nodejs as opposed to being a standalone npm package.
Cheers, Laurenz