Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AshutoshSabnekar opened this issue Aug 10, 2020 · 1 comment

Comments

@AshutoshSabnekar
Copy link

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.

@aiky967
Copy link

aiky967 commented Jan 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants