Decentralized Star Notary.
Crypto Dolar
CRYDO
0x0ADc02226e26481DA1B0a55fd118A7AB4a436744
- Truffle v5.3.6 (core: 5.3.6)
- Solidity v0.5.16 (solc-js)
- Node v10.19.0
- Web3.js v1.3.5
2.3.0
- Clean the frontend
cd app
# Remove the node_modules
# remove packages
rm -rf node_modules
# clean cache
npm cache clean
rm package-lock.json
# initialize npm (you can accept defaults)
npm init
# install all modules listed as dependencies in package.json
npm install
- Install packages for the truffle compilation On the root directory, run:
npm install
- Start Truffle by running
# For starting the development console
truffle develop
# truffle console
# For compiling the contract, inside the development console, run:
compile
# For migrating the contract to the locally running Ethereum network, inside the development console
migrate --reset
# For running unit tests the contract, inside the development console, run:
test
- Frontend - Once you are ready to start your frontend, run the following from the app folder:
cd app
npm run dev
'webpack-dev-server' is not recognized as an internal or external command
Solution:
- Delete the node_modules folder, the one within the /app folder
- Execute
npm install
command from the /app folder
After a long install, everything will work just fine!
ParserError: Source file requires different compiler version.
Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify "pragma solidity >=0.X.X <0.X.X".
Solution: In such a case, ensure the following in truffle-config.js
:
// Configure your compilers
compilers: {
solc: {
version: "0.5.16", // <- Use this
// docker: true,
// ...
y