-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crypto required but not loaded #696
Comments
|
Yes yes it is ok, but the problem is that in the test in the payment gateway project inside node_modules, it works fine, but when we call the library from an external controller, it doesn't find crypto. We have tried to install the crypto module because it didn't work as internal NodeJS, but we receive the same result. |
cc @nodejs/crypto |
Is there any chance that you can be more specific? “it doesn't find the crypto functions” doesn’t tell so terribly much… |
I mean that this line don't require "crypto" if I call it from an external controller. |
Can you share any code to reproduce the problem? |
Originally raised as nodejs/node#13920 |
In the external controller I am instantiating |
"In the external controller", are you referring to client-side code within a browser or is this within your node process? |
@gibfahn yes, it is mine. I have wrote in the incorrect platform, so the owner redirect me to this platform, sorry. |
@tniessen yes, a controller inside the client folder |
Well, |
We are implementing it in the client-side because we need that the client buy a product, so we have to generate the key for the payment gateway in the client-side. We have webpack dependency installed, but nothing as require.js |
@tniessen sorry, the dependency (injection) library we are using babel |
You could probably use https://github.com/crypto-browserify/crypto-browserify (or alternatives, never used anything like that). That should work with webpack. However, modern browsers provide the Ref #432 |
It is ok @tniessen a lot of thanks. We are going to try it. |
I am closing this as this problem is unrelated to node. |
Hi,
I require crypto as 'var crypto = require("crypto")', but it doesn't find the crypto functions.
I have installed the crypto module, version 0.0.3, the latest.
So, I don't know where is the problem.
I am using a NodeJS project to implement a payment gateway, using crypto but it doesn't work.
The test in this module (in node_modules folder) works fine, but in an external controller instantiating the library not.
Thanks.
The text was updated successfully, but these errors were encountered: