mjhm / create-react-dapp Goto Github PK
View Code? Open in Web Editor NEWCreate React Ethereum dApps with no configuration.
License: MIT License
Create React Ethereum dApps with no configuration.
License: MIT License
Hello,
I'm getting the following issues when running migrate:
`> cd dapp && truffle migrate --reset --compile-all
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/Voting.sol...
Compiling ./lib/mortal.sol...
Compiling ./lib/owned.sol...
Compilation warnings encountered:
/Users/saraczyzewicz/Dev/slothio/dapp/lib/owned.sol:12:5: Warning: This declaration shadows an existing declaration.
function owned() public {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/lib/owned.sol:3:1: The shadowed declaration is here:
contract owned {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:13:3: Warning: This declaration shadows an existing declaration.
function Migrations() public {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:5:1: The shadowed declaration is here:
contract Migrations is mortal {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Voting.sol:11:3: Warning: This declaration shadows an existing declaration.
function Voting(bytes32[] candidateNames) public {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Voting.sol:6:1: The shadowed declaration is here:
contract Voting is mortal {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/lib/owned.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.17;
^----------------------^
,/Users/saraczyzewicz/Dev/slothio/dapp/lib/owned.sol:12:5: SyntaxError: Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it.
function owned() public {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/lib/mortal.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.17;
^----------------------^
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.17;
^----------------------^
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:13:3: SyntaxError: Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it.
function Migrations() public {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Voting.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.11;
^----------------------^
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Voting.sol:11:3: SyntaxError: Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it.
function Voting(bytes32[] candidateNames) public {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/lib/owned.sol:12:5: Warning: This declaration shadows an existing declaration.
function owned() public {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/lib/owned.sol:3:1: The shadowed declaration is here:
contract owned {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:13:3: Warning: This declaration shadows an existing declaration.
function Migrations() public {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:5:1: The shadowed declaration is here:
contract Migrations is mortal {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Voting.sol:11:3: Warning: This declaration shadows an existing declaration.
function Voting(bytes32[] candidateNames) public {
^ (Relevant source part starts here and spans across multiple lines).
/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Voting.sol:6:1: The shadowed declaration is here:
contract Voting is mortal {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/saraczyzewicz/Dev/slothio/dapp/contracts/Migrations.sol:22:5: TypeError: Name has to refer to a struct, enum or contract.
Migrations upgraded = Migrations(new_address);
^--------^
Compilation failed. See above.
Truffle v5.0.2 (core: 5.0.2)
Node v11.6.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ migrate: cd dapp && truffle migrate --reset --compile-all
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ migrate script.
npm ERR! This is probably not a problem with npm. There is likely additional log`
And the localhost page denotes 'Unhandled Rejection (Error): Couldn't find info file "contract-info/Voting.json". Perhaps you haven't run migrations for contract "Voting" yet, or the migrations aren't calling the "deployInfo" function.'
Please advise - thank you!
/template/TEMPLATE.md has link to https://github.com/mjhm/create-react-dapp/blob/master/template/REACT.md
Actual
Clicking the link shows 404
Expected
Clicking the link either goes to:
https://github.com/facebook/create-react-app
or
https://www.npmjs.com/package/create-react-app
I have a bunch of questions around the migration process:
deployInfo.js
script? Couldn't we have just copied the ABI files that truffle creates and use those?truffle-contract
package?public
folder rather than the src
folder? This would avoid having to use axios
to make multiple calls for the ABI files.I mainly ask these questions because I'm interested to learn and potentially contribute to this project in the future. I have some ideas as to why the different decisions were made, but interested to hear what your actual reasons were.
Thanks for this cool project! Looks like it could be really helpful to get started quickly.
I got playing with the project and was wondering why MetaMask doesn't show up when I vote? And is there a way to make MetaMask show up to also simulate what it will be like for users in production?
When running npx create-react-dapp
on Windows, the following error occurs.
=> sandbox npx create-react-dapp create-react-dapp
npx: installed 1 in 4.322s
'"/bin/bash"' is not recognized as an internal or external command,
operable program or batch file.
Will you be supporting create react app 2?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.