Please help me with the connection of the library. Install the following library - node-gost ( https://github.com/romansopov/crypto )
I'm trying to connect it to my project like this:
const gost = require("../../node_modules/node-gost/index"); so
import * as gost from "../../node_modules/node-gost/index"; I get the error: Module not found: Can't resolve 'gostRandom' in '/ home / user / project / node_modules / node-gost / lib'.
Content index.js library:
module.exports = require('./lib/gostCrypto'); require('./lib/gostASN1'); require('./lib/gostCert'); require('./lib/gostCipher'); require('./lib/gostCMS'); require('./lib/gostCoding'); require('./lib/gostDigest'); require('./lib/gostEngine'); require('./lib/gostKeys'); require('./lib/gostRandom'); require('./lib/gostSecurity'); require('./lib/gostSign'); require('./lib/gostViewer'); The library has a test file test.js, in which the connection works correctly.
const gost = require('./index'); console.log(gost);
require("node-gost");have you tried? - Darth