smartcontractkit / full-blockchain-solidity-course-js

Learn Blockchain, Solidity, and Full Stack Web3 Development with Javascript
12.4k stars 2.98k forks source link

shows error when running the solc-js compile code #5084

Closed Chrisronald closed 1 year ago

Chrisronald commented 1 year ago

Lesson

Lesson 5

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

No response

Operating System

None

Describe the bug

Screenshot 2023-03-14 180802

sheoran0917 commented 1 year ago

@Chrisronald You are getting this error because you created a folder name simplestorage.sol where you have kept your contracts.

yarn solcjs --bin --abi --include-path node_modules / --base-path . -o . SimpleStorage.sol

This will search the contract in root path but you have your contract in simplestorage.sol/SimpleStorage.sol.

You can update your command as below:

yarn solcjs --bin --abi --include-path node_modules / --base-path . -o . simplestorage.sol/SimpleStorage.sol

This will resolve this error.

alymurtazamemon commented 1 year ago

@Chrisronald And this is not the course-related issue, instead, it is your code-related issue. Please come to the discussions tab, there are many active contributors there available for help.

closing #5884

sheoran0917 commented 1 year ago

@alymurtazamemon - I replied on the bug that it is not the code issue. I provided the solution not asked any questions. Bug was originally raised by @Chrisronald.

alymurtazamemon commented 1 year ago

@sheoran0917 My mistake I wanted to tag @Chrisronald!