truffle install errors with 'Cannot read property '1' of null' (Node v10 only)

Created on 6 Jun 2018  Â·  8Comments  Â·  Source: trufflesuite/truffle

  • [x] I've asked for help in the Truffle Gitter before filing this issue.

Issue

Running truffle install results in a TypeError

Steps to Reproduce

type "truffle install oraclize-api" or just "truffle install" at the command prompt

Expected Behavior

For it to work!

Actual Results

$ truffle install
TypeError: Cannot read property '1' of null
    at module.exports (/usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/utils/args.js:9:1)
    at processExports (/usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:61:1)
    at /usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:137:1
    at Array.forEach (<anonymous>)
    at processExports (/usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:132:4)
    at processExports (/usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:88:1)
    at /usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:137:1
    at Array.forEach (<anonymous>)
    at processExports (/usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:132:4)
    at module.exports (/usr/local/lib/node_modules/truffle/build/webpack:/~/promisify-node/index.js:164:1)

Environment

  • Operating System: macOS High Sierra 10.13.4
  • Ethereum client: geth 1.8.10-stable
  • Truffle version (truffle version): Truffle v4.1.11 (core: 4.1.11), Solidity v0.4.24 (solc-js)
  • node version (node --version): v10.3.0
  • npm version (npm --version): 6.1.0

Most helpful comment

This should be fixed in 4.1.12. Please ping if you still see this.

All 8 comments

@adennen Thanks for reporting.

This may be something specific to the oraclize package. I just ran truffle install zeppelin and was successful. With oraclize I'm getting a slightly different error FWIW:

truffle install oraclize-api

/usr/local/lib/node_modules/truffle/build/webpack:/~/ethpm-registry/~/truffle-contract/~/web3/~/bignumber.js/bignumber.js:1178
            var error = new Error( [
^
BigNumber Error: new BigNumber() not a base 16 number: 

EthPM is in the middle of a major rewrite, sorry. As a workaround you could clone Oraclize's contracts from github here.

@cgewecke @adennen

Happens with zeppelin as well

$ ./node_modules/.bin/truffle install zeppelin
TypeError: Cannot read property '1' of null
    at module.exports (/home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/utils/args.js:9:1)
    at processExports (/home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:61:1)
    at /home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:137:1
    at Array.forEach (<anonymous>)
    at processExports (/home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:132:4)
    at processExports (/home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:88:1)
    at /home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:137:1
    at Array.forEach (<anonymous>)
    at processExports (/home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:132:4)
    at module.exports (/home/project/build/contracts/solidity/node_modules/truffle/build/webpack:/~/promisify-node/index.js:164:1)
$ node --version
v10.2.1
$ ./node_modules/.bin/truffle version
Truffle v4.1.11 (core: 4.1.11)
Solidity v0.4.24 (solc-js)

@adennen @mrinalwadhwa

Just leaving this as a note while we investigate, but it seems to be Node version compatibility issue:

  • Node 8 (works)
  • Node 9 (works)
  • Node 10 (broken)

Downloading...
Error: Error making request to https://raw.githubusercontent.com/truffle-box/bare-box/master/truffle.js. Got error: getaddrinfo ENOTFOUND raw.githubusercontent.com raw.githubusercontent.com:443. Please check the format of the requested resource.
at Request._callback (C:\Users\blockchain\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-box\lib\utils\unbox.js:45:1)
at self.callback (C:\Users\blockchain\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\request\request.js:185:1)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Users\blockchain\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\request\request.js:877:1)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)

i am also faced this type of error please give me the help

@bhemeswararaoa Your error is different - it's caused by being behind a firewall which limits your access to Github. That problem is being tracked at #766 where there's a link that will let you download the template from browser to desktop.

ok i want to create ico with security please give me the help

On Sat, 16 Jun 2018 8:55 PM c-g-e-w-e-k-e->, notifications@github.com
wrote:

@bhemeswararaoa https://github.com/bhemeswararaoa Your error is
different - it's caused by being behind a firewall which limits your access
to Github. That problem is being tracked at #766
https://github.com/trufflesuite/truffle/issues/766 where there's a link
that will let you download the template from browser to desktop.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/985#issuecomment-397819482,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmbjKXWHRFEWN5B4aGlGbMUJV24QuCt7ks5t9SN2gaJpZM4UbwPY
.

@bhemeswararaoa This is a just a development tool. There is a large community of engineers developing secure crowdsale contracts (among other things) at openzeppelin-solidity you might want to check out.

Also well worth a visit is the documentation at consensys/best-practices on solidity smart contract design.

This should be fixed in 4.1.12. Please ping if you still see this.

Was this page helpful?
0 / 5 - 0 ratings