I unboxed petdapp and done some editing where I need to import bcrypt-nodejs in app.js and used following steps.

npm install bcrypt-nodejs --save

npm install require --save


var bcrypt = require('bcrypt-nodejs)

While executing application it gives an error Cannot find module bcrypt-nodejs.

Do I need to specify the path anywhere?

bs-config.json is as follows:

 "server": {
"baseDir": ["./src", "./build/contracts"]

I added ./node_modules under "baseDir" along with folder path src and contract. It did not resolved the issue.

I tried package aes256 module and get same error with warning as :

[ts] File is a CommonJS module; it may be converted to an ES6 module.
Could not find a declaration file for module 'aes256'. '/home/Documents/Dapp/node_modules/aes256/index.js' implicitly has an 'any' type.
  Try `npm install @types/aes256` if it exists or add a new declaration (.d.ts) file containing `declare module 'aes256';`

I tried another method : import { default as aes } from 'aes256';. Still same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.