blockchainbean2
blockchainbean2 copied to clipboard
Cannot find module 'fabric-contract-api' or its corresponding type declarations
I am a complete newbie to the development and Blockchain tech. Need help in the below issue
Getting an error for Smart Contract as "Cannot find module 'fabric-contract-api' or its corresponding type declarations".
When I opened the command prompt and tried to runt eh query to install the Fabric-Conract api : "npm install --save fabric-contract-api" , there is an erros saying the node and NMP versions are outdated.
However, when I was installing the tools for the IBM Blockchain Platform it specifically asked for NODEversion to be 10X and NMP version to be 6.X. Please help here, if I need to upgrade the Node and NPM version or I am using a wrong NPM installation command.
Also, getting an error for Buffer keyword in 2 instances. Cannot find name 'Buffer'. Did you mean 'buffer'?ts(2552) my-asset-contract.ts(26, 15): 'buffer' is declared here.
I got the same problem and I did the same. npm install --save fabric-contract-api And it worked.
check package.json file if "fabric-contract-api" is downloaded or not.