aragon / aragon-react-kit-boilerplate

React boilerplate for Aragon applications
Other
17 stars 10 forks source link

Error trying to run: npm run start:aragon:http #17

Closed lismore closed 5 years ago

lismore commented 6 years ago

I forked and downloaded the aragon-boilerplate repo.

did an npm install and then followed the instructions in the readme file.

$ npm run start:app | works fine $ npm run start:aragon:http | fails

Error

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fundraisingapp@1.0.0 start:aragon:http: `aragon run --http localhost:8001 --http-served-from ./dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fundraisingapp@1.0.0 start:aragon:http script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lismore/.npm/_logs/2018-11-11T12_39_53_249Z-debug.log

The full output of the complete log file is here

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/11.1.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'start:aragon:http' ]
2 info using npm@6.4.1
3 info using node@v11.1.0
4 verbose run-script [ 'prestart:aragon:http',
4 verbose run-script   'start:aragon:http',
4 verbose run-script   'poststart:aragon:http' ]
5 info lifecycle fundraisingapp@1.0.0~prestart:aragon:http: fundraisingapp@1.0.0
6 info lifecycle fundraisingapp@1.0.0~start:aragon:http: fundraisingapp@1.0.0
7 verbose lifecycle fundraisingapp@1.0.0~start:aragon:http: unsafe-perm in lifecycle true
8 verbose lifecycle fundraisingapp@1.0.0~start:aragon:http: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/.bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/dotnet:~/.dotnet/tools
9 verbose lifecycle fundraisingapp@1.0.0~start:aragon:http: CWD: /Users/lismore/Documents/GitHub/aragon-fundraising-application
10 silly lifecycle fundraisingapp@1.0.0~start:aragon:http: Args: [ '-c',
10 silly lifecycle   'aragon run --http localhost:8001 --http-served-from ./dist' ]
11 silly lifecycle fundraisingapp@1.0.0~start:aragon:http: Returned: code: 1  signal: null
12 info lifecycle fundraisingapp@1.0.0~start:aragon:http: Failed to exec start:aragon:http script
13 verbose stack Error: fundraisingapp@1.0.0 start:aragon:http: `aragon run --http localhost:8001 --http-served-from ./dist`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:970:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
14 verbose pkgid fundraisingapp@1.0.0
15 verbose cwd /Users/lismore/Documents/GitHub/aragon-fundraising-application
16 verbose Darwin 18.2.0
17 verbose argv "/usr/local/Cellar/node/11.1.0/bin/node" "/usr/local/bin/npm" "run" "start:aragon:http"
18 verbose node v11.1.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error fundraisingapp@1.0.0 start:aragon:http: `aragon run --http localhost:8001 --http-served-from ./dist`
22 error Exit status 1
23 error Failed at the fundraisingapp@1.0.0 start:aragon:http script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Also relevant I notice lots of warnings

screenshot 2018-11-11 at 12 46 20

some additional info to help troubleshoot this,

macOS Mojave node v11.1.0 npm 6.4.1 solc@0.4.25

additional output

Compilation warnings encountered:

/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:20:48: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
        if (records[node].owner != msg.sender) throw;
                                               ^---^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:27:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function ENS() public {
    ^ (Relevant source part starts here and spans across multiple lines).
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:71:9: Warning: Use of the "var" keyword is deprecated.
        var subnode = keccak256(node, label);
        ^---------^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/PublicResolver.sol:43:44:Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
        if (ens.owner(node) != msg.sender) throw;
                                           ^---^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/PublicResolver.sol:51:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function PublicResolver(AbstractENS ensAddr) public {
    ^ (Relevant source part starts here and spans across multiple lines).
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/PublicResolver.sol:144:9:Warning: Use of the "var" keyword is deprecated.
        var record = records[node];
        ^--------^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/PublicResolver.sol:164:53: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
        if (((contentType - 1) & contentType) != 0) throw;
                                                    ^---^
,@aragon/apps-shared-minime/contracts/MiniMeToken.sol:37:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function Controlled()  public { controller = msg.sender;}
    ^-------------------------------------------------------^
,@aragon/apps-shared-minime/contracts/MiniMeToken.sol:123:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function MiniMeToken(
    ^ (Relevant source part starts here and spans across multiple lines).
,@aragon/apps-shared-minime/contracts/MiniMeToken.sol:195:9: Warning: Use of the "var" keyword is deprecated.
        var previousBalanceFrom = balanceOfAt(_from, block.number);
        ^---------------------^
,@aragon/apps-shared-minime/contracts/MiniMeToken.sol:209:9: Warning: Use of the "var" keyword is deprecated.
        var previousBalanceTo = balanceOfAt(_to, block.number);
        ^-------------------^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/apps-shared-minime/contracts/MiniMeToken.sol:37:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function Controlled()  public { controller = msg.sender;}
    ^-------------------------------------------------------^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/apps-shared-minime/contracts/MiniMeToken.sol:123:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function MiniMeToken(
    ^ (Relevant source part starts here and spans across multiple lines).
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/apps-shared-minime/contracts/MiniMeToken.sol:195:9: Warning: Use of the "var" keyword is deprecated.
        var previousBalanceFrom = balanceOfAt(_from, block.number);
        ^---------------------^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/apps-shared-minime/contracts/MiniMeToken.sol:209:9: Warning: Use of the "var" keyword is deprecated.
        var previousBalanceTo = balanceOfAt(_to, block.number);
        ^-------------------^
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/contracts/Kit.sol:22:5: Warning: Defining constructors as functionswith the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function KitBase(DAOFactory _fac, ENS _ens) public {
    ^ (Relevant source part starts here and spans across multiple lines).
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/contracts/Kit.sol:48:5: Warning: Defining constructors as functionswith the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function Kit(ENS ens) KitBase(DAOFactory(0), ens) public{
    ^ (Relevant source part starts here and spans across multiple lines).
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/contracts/misc/Migrations.sol:11:3: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
  function Migrations() {
  ^ (Relevant source part starts here and spans across multiple lines).
,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:58:37: Warning: This declaration shadows an existing declaration.
    function setOwner(bytes32 node, address owner) only_owner(node) public {
                                    ^-----------^
/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:34:5: The shadoweddeclaration is here:
    function owner(bytes32 node) public constant returns (address) {
    ^ (Relevant source part starts here and spans across multiple lines).

,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:70:59: Warning: This declaration shadows an existing declaration.
    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) only_owner(node) public {
                                                          ^-----------^
/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:34:5: The shadoweddeclaration is here:
    function owner(bytes32 node) public constant returns (address) {
    ^ (Relevant source part starts here and spans across multiple lines).

,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:81:40: Warning: This declaration shadows an existing declaration.
    function setResolver(bytes32 node, address resolver) only_owner(node) public {
                                       ^--------------^
/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:41:5: The shadoweddeclaration is here:
    function resolver(bytes32 node) public constant returns (address) {
    ^ (Relevant source part starts here and spans across multiple lines).

,/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:91:35: Warning: This declaration shadows an existing declaration.
    function setTTL(bytes32 node, uint64 ttl) only_owner(node) public {
                                  ^--------^
/Users/lismore/Documents/GitHub/aragon-fundraising-application/node_modules/@aragon/os/contracts/lib/ens/ENS.sol:48:5: The shadoweddeclaration is here:
    function ttl(bytes32 node) public constant returns (uint64) {
    ^ (Relevant source part starts here and spans across multiple lines)
izqui commented 6 years ago

What version of the CLI are you using? Can you try running the command directly (aragon run --http ...)? Looks like an NPM binary linking error

izqui commented 6 years ago

Also the CLI uses truffle 4.1.14, which has solc 0.4.24. Try also compiling your contracts directly with the CLI doing aragon contracts compile --all

lismore commented 6 years ago

I did aragon -v and it says 5.2.0

Truffle v4.1.14 (core: 4.1.14) Solidity v0.4.24 (solc-js)

lismore commented 6 years ago

aragon contracts compile --all

this produces lots of compilation warnings previously shown above ^

I uninstalled truffle -g and Solidity -g , deleted the node_modules folder and run npm install again.

It is still giving the same issues when I run: aragon contracts compile --all

lismore commented 6 years ago

As a test ,

I created a new folder run the following commands

aragon init app react-kit aragon run --kit Kit --kit-init @ARAGON_ENS

and it built and run successfully.

sohkai commented 6 years ago

Those compilation warnings shouldn't be a problem (just some things with ENS and the included kit not being updated yet).

We'll soon have better debug logging in the CLI to help figure out what the problem is.