Search code examples
npmethereumpackage.jsonethers.jsuniswap

typechain --target ethers-v5 is not recognized as an internal command


I have in my package.json file :

 "scripts": {
    "compile-contract-types": "yarn compile-external-abi-types && yarn compile-v3-contract-types",
    "compile-external-abi-types": "typechain --target ethers-v5 --out-dir src/abis/types './src/abis/**/*.json'",
    "compile-v3-contract-types": "typechain --target ethers-v5 --out-dir src/types/v3 './node_modules/@uniswap/?(v3-core|v3-periphery)/artifacts/contracts/**/*.json'",

When I try to run this I always have this error (I'm on windows) any idea ?

typechain --target ethers-v5 --out-dir src/types/v3 './node_modules/@uniswap/?(v3-core|v3-periphery)/artifacts/contracts/**/*.json' is not recognized as an internal command

Solution

  • Found it finally... replaced './node_modules/@uniswap/?(v3-core|v3-periphery)/artifacts/contracts/**/*.json' by ./node_modules/@uniswap/v3-core/artifacts/contracts/**/*.json