Trying to use some installed npm packages like fs-extra into below js files given by Truffle.But it says "can't find module "fs-extra". 1) Tried importing local js files using require() method but that fails too. 2) Tried running separate js files using node and it works just fine. 3) Issue comes when I try to use require("fs-extra") inside a function declared in APP object. App = { web3Provider: null, contracts: {}, init: async function () {...
Originally asked by HarshEc on Stack Exchange (stackoverflow) (CC BY-SA 4.0).