Thx @dan-i,
After I install the whole folder into my comp, What do i do next.I am using windows btw.
Thanks
Once clicked Install does that trigger the package installation in Atom?
You should see something like this:
If that does not happen:
- Open Atom
- Packages > Settings > Manage Packages
- Look for language solidity and install.
can anyone tell me where the problem is truffle init and truffle compile not working
C:\Users\SRIRAM>d:
D:>mkdir ethereum
D:>mkdir ivaneth
D:>cd ethereum
D:\ethereum> truffle init
√ Preparing to download
√ Downloading
√ Cleaning up temporary files
√ Setting up box
Unbox successful. Sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
D:\ethereum>truffle compile
Compiling your contracts…
Error: Error: Could not find D:/ethereum/contracts/Helloworld.sol from any sources
at Object.compile (C:\Users\SRIRAM\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\legacy\index.js:72:1)
Truffle v5.0.42 (core: 5.0.42)
Node v14.8.0
D:\ethereum>
had some trouble with “truffle init” i had to change some execution policies on windows
In the Truffle Introduction Ethereum 201 Section, the Hello World video does not show the link that can help us edit the Truffle compiler solidity version. Filip’s version is not in the list of Truffle anymore when I see it in Terminal. Please advise on how to help me fix that so that I follow his steps carefully without trouble throughout the course. And again, the link he said he would post to help fix this issue is not there.
@Taha @filip Please help.
Hey @TommyBrook
In your screenshot I see.. and 67 more. Use --all to see the full list
Please type truffle compile --list --all
I think you will see back from Solidity 0.2 or close to that one.
I think you just need to check truffle config as follow, in order to tell truffle which version it needs to use.
- Open your project folder and look for the file called
truffle-config.js
- Go to the bottom of the file, you will see:
compilers: {
solc: {
//version: "0.5.8", // Fetch exact version from solc-bin (default: truffle's version)
}
}
You have to uncomment the version and write 0.5.12.
Should be like this
compilers: {
solc: {
version: "0.5.12", // Fetch exact version from solc-bin (default: truffle's version)
}
}
Happy learning
Dani
Hey guys … In the setup video, how did Filip get the blue Documents/Helloworld to show inside the npm command?
I got everything setup with truffle init and saw the unboxed and test truffle etc but then it goes down to my root computer name and username/ and awaits for me to type a command.
I want to make sure I have the folders properly setup before continuing.
Thanks
D:\ethereum\helloworld>truffle compile
Compiling your contracts…
Everything is up to date, there is nothing to compile.
D:\ethereum\helloworld>truffle migrate
Compiling your contracts…
Everything is up to date, there is nothing to compile.
Starting migrations…
Network name: ‘ganache’
Network id: 5777
Block gas limit: 0x6691b7
1_initial_migration.js
Deploying ‘Migrations’
transaction hash: 0xed9d5e94bf8bb766cf746dc0e5380ea3bd4b463d2363b0a360823fc5b148590e
Blocks: 0 Seconds: 0
contract address: 0xfF7b09031d69e00A82a4c0339B4405250eA7864d
block number: 1
block timestamp: 1600004921
account: 0xaa779E6C1F6a86464c64E758EC89AFD0E35C80B9
balance: 99.99561586
gas used: 219207
gas price: 20 gwei
value sent: 0 ETH
total cost: 0.00438414 ETH
Saving migration to chain.
Saving artifacts
Total cost: 0.00438414 ETH
2-helloworld-deploy.js
Error: Error: Could not find artifacts for helloworld from any sources
at Object.run (C:\Users\SRIRAM\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:96:1)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at runMigrations (C:\Users\SRIRAM\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:253:1)
at C:\Users\SRIRAM\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:216:1
Truffle v5.0.42 (core: 5.0.42)
Node v14.8.0
truffle(ganache)>
Hey @cryptocoder,
I would need to check you migration file, the one you wrote for HelloWorld migration. Could you please post it?
Thanks
Dani
Hey @NeoKanoPheus,
You can easily navigate into a folder by typing:
cd folderpath
If you do not want to write the path manually (or just look for it manually) you can type
cd
then drag and drop the folder you wish to access into the terminal / powershell and press enter.
Happy learning,
Dani
Thanks … That helped to move forward
Hi
I’ve followed instructions for using the correct compiler but it looks like I’m getting a slight error in the first line of my program. It does look like I’m able to compile successfully using version 0.5.12 but I would like to get rid of this error. Anyone have any solutions? Thank you in advance!
Hey @joekim
Does your project compile despite that red line in your screenshot?
I do not see anything wrong in your pragma statement, I do assume that that’s just the text editor you are using.
Have you tried Atom?
Let me know.
If you project does not compile please send me the whole repo and I will take a look.
Happy learning,
Dani
Hey @dan-i thank you for your reply. Yes it compiles fine and i’m using VS Code - do you know any workaround for this error or is Atom preferable to VS Code somehow?
Hey @joekim
I am not familiar with VS so bear with me.
I just download it and installed this package:
Are you using the same package?
I do not get the red line under the pragma statement.
Let me know and I will look further.
Cheers,
Dani
@joekim I had the same issue as you and by hovering on top of the pragma statement with the mouse, I was getting the following message:
If that’s the same message you get, you need to select the right compiler.
As per documentation here > https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
You can change the compiler by:
-
Right click and select ‘change workspace compiler version (Remote).’
-
Select the right compiler from the list (in your case 0.5.12);
-
Restart Vs.
If this did not solve, I saw many topic on Google that are discussing the issue, one of these is: https://stackoverflow.com/questions/21098333/visual-studio-compiles-fine-but-still-shows-red-lines
I encourage you to have a look.
Have a great day,
Dani