blockchainbean2 icon indicating copy to clipboard operation
blockchainbean2 copied to clipboard

Cannot find module 'fabric-contract-api' or its corresponding type declarations

Open AshutoshSabnekar opened this issue 4 years ago • 1 comments

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.

image

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.

AshutoshSabnekar avatar Aug 10 '20 14:08 AshutoshSabnekar

I got the same problem and I did the same. npm install --save fabric-contract-api And it worked. Annotation 2021-01-10 151501

check package.json file if "fabric-contract-api" is downloaded or not.

aiky967 avatar Jan 10 '21 09:01 aiky967