Showing posts with label pancake-swap. Show all posts
Showing posts with label pancake-swap. Show all posts

Friday, January 21, 2022

Error: ENOENT: no such file or directory, stat '../pancake-swap-periphery/node_modules/@uniswap/v2-core/contracts/interfaces/IPancakeFactory.sol

While trying to do pancake-swap clone, we might get the following issue while building a contract.

Error: ENOENT: no such file or directory, stat '../pancake-swap-periphery/node_modules/@uniswap/v2-core/contracts/interfaces/IPancakeFactory.sol'

It is due to the file is not found in node modules as suggested in error. If you go to the package.json file you can see the following dependency is injected inside the dependencies

"@uniswap/v2-core": "^1.0.1"

So here, pancake-swap core dependency files are not found which is imported in the contract we are building.

Let's add the required dependency from the git panackage-swap-core

replace the above dependency:
"@uniswap/v2-core": "git://github.com/pancakeswap/pancake-swap-core.git"

Now install the added dependency

npm install
After that, we can try building the contract.

Share: