SigmaGmbH / swisstronik-tutorials

This repo provides tutorials/samples for deploying and interacting with contracts. Learn to use Hardhat and SwisstronikJS to confidently use Swisstronik Blockchain.
22 stars 75 forks source link

Error: configuration on package.json #4

Closed warifp closed 1 year ago

warifp commented 1 year ago

I read this repo using .js not .ts

I looked at the README.md documentation section, how to Testing and Deployment: npm run deploy : https://github.com/SigmaGmbH/swisstronik-tutorials/blob/main/PERC20_interaction/README.md

When I run "npm run deploy" an error appears like this

> deploy
> hardhat run scripts/deploy.ts

Error HH601: Script scripts/deploy.ts doesn't exist.

HardhatError: HH601: Script scripts/deploy.ts doesn't exis

it turns out that the package.json code is like this, when deploying the script he runs hardhat run scripts/deploy.ts, it should be deploy.js not deploy.ts

"scripts": {
    "compile": "hardhat compile",
    "test": "hardhat test",
    "deploy": "hardhat run scripts/deploy.ts"
  }
warifp commented 1 year ago

This is the correct one

"scripts": {
    "compile": "hardhat compile",
    "test": "hardhat test",
    "deploy": "hardhat run scripts/deploy.js"
  }

Because in the scripts folder there is only .js (deploy.js)

SantiagoDevRel commented 1 year ago

Answered here https://github.com/SigmaGmbH/swisstronik-tutorials/issues/5