1

I have a truffle project which was running on another machine without problem. But now I'm trying to npm install and I'm getting this error:

>truffle install

Error: project ID is required
    at Object.InvalidResponse (C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\ethpm-registry\~\truffle-contract\~\web3\lib\web3\errors.js:35:1)
    at C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\ethpm-registry\~\truffle-contract\~\web3\lib\web3\requestmanager.js:86:1
    at XMLHttpRequest.request.onreadystatechange (C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\web3\lib\web3\httpprovider.js:128:1)
    at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:64:1)
    at XMLHttpRequest._setReadyState (C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:354:1)
    at XMLHttpRequest._onHttpResponseEnd (C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:509:1)
    at IncomingMessage.<anonymous> (C:\Users\Home\Desktop\Authcoin-truffle\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:469:1)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! authcoin@1.0.0 postinstall: `truffle install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the authcoin@1.0.0 postinstall 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!     C:\Users\Home\AppData\Roaming\npm-cache\_logs\2020-02-24T19_10_25_922Z-debug.log

This is what I'm getting when running "truffle version"

Truffle v5.1.14 (core: 5.1.14)
Solidity v0.5.16 (solc-js)
Node v10.16.0
Web3.js v1.2.1

I found similar error in infura related questions but I'm not using infura at all. So how can I get rid of this error?

1
  • What does truffel install do? usually npm install!
    – Majd TL
    Feb 24, 2020 at 21:32

1 Answer 1

0

Probably it's the truffle-config.js or truffle.js file that cause the error, in some truffle boxes the Infura's service link is set without ProjectId in it e.g. https://ropsten.infura.io/<your infura key> so when you try to compile they throw this error. Please set up your Infura link properly on Ropsten and Rinkeby as Project ID is required or remove them it you do not need them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.