안녕하세요. 좋은 강의 항상 감사드립니다. 잘 따라한것 같은데 DigitalPicture.sol 컴파일시 에러가 발생하네요... Migrations.sol은 버전 수정해서 (truffle-config.js) 컴파일에 문제가 없는데... DigitalPicture.sol은 버전관련 에러가 발생하는것 같은데요. 혹시 동일 문제 발생하시는 분 계신가요? 영상에는 안나왔지만 혹시 ERC721.sol이나 ERC721URIStorage.sol, Counters.sol의 버전도 바꿔줘야 하나해서 바꿔봤는데요 해결이 안되네요. Compiling your contracts... =========================== ✓ Fetching solc version list from solc-bin. Attempt #1 ✓ Downloading compiler. Attempt #1. ✓ Downloading compiler. Attempt #2. ✖ Downloading compiler. Attempt #3. ✓ Fetching solc version list from solc-bin. Attempt #1 ✓ Downloading compiler. Attempt #1. ✓ Downloading compiler. Attempt #2. ✖ Downloading compiler. Attempt #3. > Compiling ./contracts/DigitalPicture.sol > Compiling ./contracts/Migrations.sol > Compiling @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol > Compiling @openzeppelin/contracts/utils/Counters.sol CompileError: @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol:4:1: ParserError: Source file requires different compiler version (current compiler is 0.5.16+commit.9c3226ce.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version pragma solidity ^0.8.0; ^---------------------^ ,@openzeppelin/contracts/utils/Counters.sol:28:9: ParserError: Expected primary expression. unchecked { ^-------^ Error: Truffle is currently using solc >=0.4.22
이 어려운 걸.. 한시간만에 설명하시는게 정말 대단하십니다 bb
좋은 영상이었습니다 감사합니다!
와~ 이걸 이제봤네 씨부레 왜 아무도 말을 안햇!!!!! 잘 봤습니다.
다음 수업 기대되는데 언제 나올까요?
선생님, 강의 감사드립니다. 가르쳐주시는 대로 정상적으로 컴파일까지 갔는데, DigitalPicture.json 파일만 만들어지네요 ^^;; 왜 그럴까요?
혹시 오프라인 강의 진행 하시나요?
truffle init 은 빈 구성만 생성하기 때문에 truffle unbox pet-shop 을 입력해야 기본구조가 생성이 됩니다 참고 부탁드려요
npm i -g truffle@5.4.33 버전 바꿔도 되더라고요
@@donalisa7850 오 그렇군요 감사합니다~
안녕하세요. 좋은 강의 항상 감사드립니다. 잘 따라한것 같은데 DigitalPicture.sol 컴파일시 에러가 발생하네요... Migrations.sol은 버전 수정해서 (truffle-config.js) 컴파일에 문제가 없는데... DigitalPicture.sol은 버전관련 에러가 발생하는것 같은데요. 혹시 동일 문제 발생하시는 분 계신가요? 영상에는 안나왔지만 혹시 ERC721.sol이나 ERC721URIStorage.sol, Counters.sol의 버전도 바꿔줘야 하나해서 바꿔봤는데요 해결이 안되네요.
Compiling your contracts...
===========================
✓ Fetching solc version list from solc-bin. Attempt #1
✓ Downloading compiler. Attempt #1.
✓ Downloading compiler. Attempt #2.
✖ Downloading compiler. Attempt #3.
✓ Fetching solc version list from solc-bin. Attempt #1
✓ Downloading compiler. Attempt #1.
✓ Downloading compiler. Attempt #2.
✖ Downloading compiler. Attempt #3.
> Compiling ./contracts/DigitalPicture.sol
> Compiling ./contracts/Migrations.sol
> Compiling @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol
> Compiling @openzeppelin/contracts/utils/Counters.sol
CompileError: @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol:4:1: ParserError: Source file requires different compiler version (current compiler is 0.5.16+commit.9c3226ce.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.8.0;
^---------------------^
,@openzeppelin/contracts/utils/Counters.sol:28:9: ParserError: Expected primary expression.
unchecked {
^-------^
Error: Truffle is currently using solc >=0.4.22
에러 메시지를 보니까 컴파일러 버전이 안맞는것 같습니다. 보통 이런 경우 node.js와 truffle, solc 등 복합적인 환경 문제로 발생하는 경우가 많아서 truffle 버전을 낮은 버전으로 설치해 보시는 걸 추천드립니다