Where can I install the package with npm in Meteor 1.3 so that other npm libraries can require it

I am trying to configure using the cloud in Meteor 1.3 beta, and Im going for the NPM package right now. I ran into a bigger problem when one of the package libraries has a crypto = require('crypto'); declaration crypto = require('crypto'); What well. I just installed the crypto package via npm. But the client still gives me the Uncaught Error: Cannot find module 'crypto' error .... any suggestions?

Please note: both modules are in the same node_modules directory:

 node_modules crypto material-ui react react-cloudinary react-dom react-mounter react-tap-event-plugin 

This is especially a problem with Meteor 1.3 since Im importing npm libraries

+6
source share
2 answers

If module A require module B than module B should be available in the node_modules directory of module A. This is the usual thing npm and node do, and that you probably know. It works the same in meteor 1.3.

If you are a module A developer, you can see peers in npm or the npm link . Or you just run npm install in the module and see if this fixes the problem.

0
source

The NPM package script can only be used on the server side, because it is a built-in NodeJS library. This is a high-performance library, so it may have been compiled.

If you can change the code, you can instead use a clean js library to create hashes, such as JS Hashes .

JS Hashes can be used both on the client side and on the server side.

0
source

All Articles