카테고리 없음

블록체인 트러블 슈팅 1 : truffle-config.js의 polyfill..

흰색텀블러 2025. 3. 3. 15:48

문제점 : 찾을수 없는 문제..

  • truffle-config.js
require("@babel/register");
// 아랫 줄!!
require("@babel/polyfill");
  • 이제 @bable/polyfill을 지원하지 않는다고 한다....
  • 그래서 아래와 같이 고쳐야한다.
require("@babel/register");
// require("@babel/polyfill");
require("core-js/stable");
require("regenerator-runtime/runtime");
  • 이렇게 한뒤에... 바로 cmd를 열어서 truffle compile하면 에러가 뜬다.
  • 설치가 되어있지 않다는... 슬픈 에러
  • 그래서 cmd 창으로 아래의 코드를 작성한다.
npm install --save core-js regenerator-runtime
  • 이걸 쳐서, 다운로드를 해준뒤에, truffle compile을 다시해주면?
ompiling your contracts...
===========================
√ Fetching solc version list from solc-bin. Attempt #1
√ Downloading compiler. Attempt #1.
> Compiling .\src\contracts\Migrations.sol
> Compiling .\src\contracts\Tether.sol
> Compilation warnings encountered:

    Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
 --> project:/src/contracts/Migrations.sol:8:5:
  |
8 |     constructor() public {
  |     ^ (Relevant source part starts here and spans across multiple lines).
  • 이렇게 성공! 이라는 창이 나온데..ㅠㅠ
  • 아우 어려워..ㅠㅠ