무료
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm install 문제가 발생하는데 해결방법이 없을까요?
node v.18.17.0npm v.9.7.1 입니다.아래 오류 문구들은 npm install 시 오류가 발생하는 부분에 대한 문구입니다. 영상처럼 node v10으로 하려고 하면 npm 버전이 싱크되지 않는다는 오류가 발생합니다. 어떻게 해결하면 좋을까요? 답변 부탁드립니다ㅠㅠ npm ERR! code 1npm ERR! git dep preparation failednpm ERR! command C:\Program Files\nodejs\node.exe C:\Users\kyuns\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\kyuns\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-runnpm ERR! npm WARN using --force Recommended protections disabled.npm ERR! npm ERR! code 1npm ERR! npm ERR! The git reference could not be foundnpm ERR! npm ERR! command git --no-replace-objects checkout 4.0npm ERR! npm ERR! error: pathspec '4.0' did not match any file(s) known to gitnpm ERR!npm ERR! npm ERR! A complete log of this run can be found in: C:\Users\kyuns\AppData\Local\npm-cache\_logs\2023-07-31T01_26_10_502Z-debug-0.lognpm ERR! A complete log of this run can be found in: C:\Users\kyuns\AppData\Local\npm-cache\_logs\2023-07-31T01_25_25_361Z-debug-0.log
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm run dev 후에 caver-js 에러 해결
ERROR in ./node_modules/caver-js/packages/caver-ipfs/src/index.js Module not found: Error: Can't resolve 'fs' in 'C:\Users\user\Desktop\sidejobs\klaytn1\addition-game-starter\node_modules\caver-js\packages\caver-ipfs\src' @ ./node_modules/caver-js/packages/caver-ipfs/src/index.js 21:11-24 @ ./node_modules/caver-js/packages sync ^\.\/.*\/src\/index\.js$ @ ./node_modules/caver-js/index.js @ ./src/index.js @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js1.에러가 발생한다 뭐가 문제인가?2.로그를 보니 caver-js 가 어쩌고 저쩌고 fs 가 어쩌고 하면서 문제가 발생한다. 3. 아마도 기존에 설치된 것들과의 버전 호환 문제가 아닌가 싶었다 4. 모르겠고 그냥 caver 다시 설치해보자 싶었다 5. npm install caver-js 하고 엔터를 갈긴다 6. 잘된다.
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm install 문제 해결
starter pack을 git으로 받아 사용하다 보니 버전 문제가 많은듯하였음 npm install을 하였을때 git 및 기타 설정값들의 버전 문제가 있는듯하였음 다른 글들에서는 node 버전을 낮추어 보라고 하였으나 추후에 또 다른 부분과 버전 문제가 달라 문제가 생길듯하였고 현재는 node 16 이상 버전이기에 너무 차이가난다 생각해서 다른 방법을 찾아보려하였음 해결방법 (임시방편) git에 완강한 사람의 package.json과 package-lock.json 파일을 복사해서 붙혀넣음 npm install 갈김 잘됨 우선은 완강을 한뒤에 몇회독을 반복하고 구조를 파악한뒤에 스타트 패키지 없이 구현 해보는것을 목표로할것.
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
truffle deploy --network klaytn 오류 해결
에러 로그 확인 및 버전 문제로 확인 AdditionGame.sol 코드수정 // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.5.0; contract AdditionGame { address public owner; constructor() public { owner = msg.sender; } function getBalance() public view returns (uint) { return address(this).balance; } function deposit() public payable { require(msg.sender == owner); } function transfer(uint _value) public returns (bool) { require(getBalance() >= _value); address payable receiver = address(uint160(msg.sender)); receiver.transfer(_value); } } Migrations.sol 코드수정 pragma solidity ^0.5.0; contract Migrations { address public owner; uint public last_completed_migration; constructor() public { owner = msg.sender; } modifier restricted() { if (msg.sender == owner) _; } function setCompleted(uint completed) public restricted { last_completed_migration = completed; } function upgrade(address new_address) public restricted { Migrations upgraded = Migrations(new_address); upgraded.setCompleted(last_completed_migration); } } truffle-config.js 코드 수정 // truffle.js config for klaytn. const HDWalletProvider = require('truffle-hdwallet-provider-klaytn') const NETWORK_ID = '1001' const GASLIMIT = '20000000000' const URL = 'https://api.baobab.klaytn.net:8651' const PRIVATE_KEY = '0x3e16481449bcbec82d6812cb1cb4eb65c0fd1e21d80d8c5436a33718c6c8d3ed' module.exports = { networks: { klaytn: { provider: new HDWalletProvider(PRIVATE_KEY, URL), network_id: NETWORK_ID, gas: GASLIMIT, gasPrice: null } }, }
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
환경설정
강사님 좋은 강의 무료로 올려주셔서 너무 감사합니다.환경설정에 BaoBab이 없는데 뭘로해야할까요??
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm install 에러
node 버전을 10으로 하면 괜찮다고 하시는 분이 계셔서 버전을 낮춰봤지만, npm 설치시 최신 버전이 아니라서 실행이 되지 않았습니다. 현재 node 버전은 16입니다만, 실행을 할 경우 아래와 같은 에러가 발생하고 있습니다. 해결 방법이 있을까요? npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\Jerry\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\Jerry\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run npm ERR! npm WARN using --force Recommended protections disabled. npm ERR! npm ERR! code 1 npm ERR! npm ERR! The git reference could not be found npm ERR! npm ERR! command git --no-replace-objects checkout 4.0 npm ERR! npm ERR! error: pathspec '4.0' did not match any file(s) known to git npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! npm ERR! C:\Users\Jerry\AppData\Local\npm-cache\_logs\2022-07-31T05_33_24_641Z-debug-0.log npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Jerry\AppData\Local\npm-cache\_logs\2022-07-31T05_30_46_809Z-debug-0.log
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
truffle deploy --network klaytn
truffle deploy --network klaytn 를 쳤는데 계속 명령어가 안먹고 무응답에 에러도 없길래 당황했는데 알고보니 truffle.js 파일이름이 truffle이어서 truffle 명령어가 안먹고 저 파일을 실행 ?시키도록 해서 그런가 보더라구요. truffle.js 파일 이름을 truffle-config.js로 바꾸니까 성공했어요
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
컴파일 에러
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; /** * @title Storage * @dev Store & retrieve value in a variable */ contract AdditionGame { address public owner; constructor() public { owner = msg.sender; } function getBalance() public view returns (uint) { return address(this).balance; } function deposit() public payable{ require(msg.sender == owner); } function transfer(uint _value) public returns (bool){ require(getBalance() >= _value); msg.sender.transfer(_value); return true; } } 이 중에서 msg.sender.tranfer(_value); 줄에서 "sender" and "transfer" are only available for objects of type "address payable" , not "address". 라는 에러가 뜨는데 어떻게 해야 하나요??
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm install 에러 납니다.
node.js 는 10.16.0npm 6.9.0 버전입니다. npm install 했을 때, 이런 에러 났는데 혹시 해결하신분 있으실까요?ㅠㅠ npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm ERR! Error while executing: npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git npm ERR! npm ERR! fatal: remote error: npm ERR! The unauthenticated git protocol on port 9418 is no longer supported. npm ERR! Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. npm ERR! npm ERR! exited with error code: 128 npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\[username]\AppData\Roaming\npm-cache\_logs\2022-04-12T06_55_37_435Z-debug.log
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm install 삼일 내내 검색했는데 해결 못했습니다...
위 에러는 npm config set node_gyp "경로" 하니 해결되었습니다. 그런데 새로운 에러를 만나서 문의드립니다. 오류 정리해주신 글이랑 구글링 엄청 해서 여기까지 왔는데 더 이상 해결이 안됩니다 혹시 이 오류 해결이 가능할까요? nvm 사용해서 node 10.15.3 npm 6.4.1 입니다
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm run dev 했는데
npm run dev 했는데 [webpack-cli] Failed to load 'C:\Users\사용자명\Downloads\NFTest\프로젝트명\webpack.config.js' config [webpack-cli] Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema. - options[0] has an unknown property 'to'. These properties are valid: object { patterns, options? } 이렇게 나오는데 어떤게 잘못 됐는지 알 수 있을까요? 구글링해서 봤는데 다 안돼서요... 버전은 다른 분들이랑 비슷하게 했는데 안되네요...
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
deploy 실행파일
deploy할대 truffle deploy --network klaytn을 사용하셧습니다. 그런데 파일명을 지정하지 않았는데 이런 경우 어떤 파일이 실행되는건가요?
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
솔리디티 4.1.15 이상의 버전은 안되나요?
솔리디티 5.1.6 버전을 쓰고 있습니다. 이전에 공부할때 그 버전을 쓰기도했고 4.1.15를 설치하려고 하면 에러가 나서요 deploy할때 5.1.6으로 쓰려고하면 이런 에러가 나옵니다 ExtendableError: Unknown network "klaytn". See your Truffle configuration file for available networks. at Object.validateNetworkConfig (C:\Users\SasukiYoko\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:111:1) at Object.detect (C:\Users\SasukiYoko\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:16:1) at WorkflowCompile.compileAndSave.then (C:\Users\SasukiYoko\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:206:1) Truffle v5.1.61 (core: 5.1.61) Node v10.15.3 꼭 4.1.15 버전을 써야하나요 ?? 5.1.6으로 하는 방법은 없을까요?
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
함수를 async를 사용하여 비동기로 작성한 이유가 궁금합니다.
안녕하세요. 강의 내용에 대하여 궁금한 점이 있어 질문드립니다. 코드를 보면 대부분 async를 이용하여 비동기방식으로 함수를 생성하였는데 그렇게 코딩하신 이유가 궁금합니다. 보면 async와 await를 이용하여 동기식으로 처리하는 함수가 꽤 있던데 처음부터 동기 함수로 작성하지 않은 이유와 그 차이를 알고 싶습니다.
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
truffle deploy에러 문의입니다 : >
안녕하세요 강사님! 노드버전을 10으로 다운하여 npm install을 하고 truffle.js도 작성하여 truffle deploy --network klaytn을 실행했는데, 아래와같이 에러가 나서 에러를 구글링해보니, You have to mention the network id in truffle.js file. 이렇게 해결하라고나오는데, 이미 NETWORK_ID는 1001로 설정된상태라 어떻게 해야하는지 모르겠어서 문의 남깁니다! This version of µWS is not compatible with your Node.js build: Error: Cannot find module './uws_darwin_x64_64.node' Falling back to a NodeJS implementation; performance may be degraded. Compiling your contracts... =========================== > Compiling ./contracts/AdditionGame.sol > Compiling ./contracts/Migrations.sol > Artifacts written to /Users/imhyeonjeong/Desktop/클레이튼 강의/build/contracts > Compiled successfully using: - solc: 0.5.16+commit.9c3226ce.Emscripten.clang Error: You must specify a network_id in your 'klaytn' configuration in order to use this network. at Object.validateNetworkConfig (/Users/imhyeonjeong/.nvm/versions/node/v14.19.0/lib/node_modules/truffle/build/webpack:/packages/environment/environment.js:133:1) at Object.detect (/Users/imhyeonjeong/.nvm/versions/node/v14.19.0/lib/node_modules/truffle/build/webpack:/packages/environment/environment.js:16:1) at Object.module.exports [as run] (/Users/imhyeonjeong/.nvm/versions/node/v14.19.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate/run.js:22:1) Truffle v5.5.0 (core: 5.5.0) Node v10.24.1
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
IDE 인터페이스가 달라져 강좌를 계속하기 어렵습니다
안녕하세요 강좌 처음부터 다 듣고 있는데 클레이튼 IDE가 너무 달라져서 어떻게 해야할지 모르겠습니다. 구글링해서 자료를 검색해봤지만 달라진 IDE에서 컨트랙트를 맺는 것에 대한 내용이 없네요. 강사님이 언급하신 Klaytn Scope 관련 강의를 찾아봤는데 어떤 것인지 모르겠습니다, 혹시 현 상황을 해결하는 데에 참고할만한 자료나 강의같은것 링크로 추천해주실 수 있으신가요? 이 강의 꼭 끝까지 듣고 싶습니다.
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
실행이 안 됩니다.
PS C:\WINDOWS\system32\addition-game-starter> npm run dev > klay-dapp-boilerplate@0.0.1 dev C:\WINDOWS\system32\addition-game-starter > webpack-dev-server 계속 missing dev가 떠서 어떻게 안 뜨게 만들었지만 계속 위와 같이만 나오고 웹 페이지에 접속이 되지 않습니다.
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
truffle deploy --network klaytn 오류
위의 그림과 같이 에러가 나옵니다. 코드는 첨부 파일에서 다시 복붙 했으나 계속해서 위와 같이 나옵니다.
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
아니..지금 쓰는거랑 아예 인터페이스가 다른데 강좌를 내리던가 해야할듯요
아니..지금 쓰는거랑 아예 인터페이스가 다른데 강좌를 내리던가 해야할듯요
- 미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
송금 이후 once transactionHash 쪽에서 에러 나는데 도움 부탁드려요.
Uncaught (in promise) TypeError: agContract.methods.deposit(...).send(...).once is not a function at Object.deposit (index.js:114) 이에러가 뜨고 receipt쪽은 실행이 안되는거 같아요.. 근데 송금은 됬어요;; Truffle v5.1.23 (core: 5.1.23) Solidity v0.5.16 (solc-js) Node v12.21.0 Web3.js v1.2.1