I have confusion about access node_modules that can be used in JavaScript. for this does anyone can give an example to call modul.export contained in the folder node_module (after install packet with NPM - nodejs) ?
tree structure file : folder ethereum any folder node_modules , file index.html (for call module.export) , package-lock.json , package.json
package.json file : enter link description here
so this way, I've installed "npm install web3". Now, when I call a function from web3 like for example in a program like this :
var Web3=require('web3');
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/metamask"));
}
console.log(web3);
Then output errors like this : enter image description here