1

I'm trying to setup development environment of truffle but I got the following error when running npm install -g truffle-expect truffle-config web3 on Windows 10 enterprise N on Azure.

PS C:\Windows\system32> npm install -g truffle-expect truffle-config web3

> web3@1.0.0-beta.4 postinstall C:\Users\wanxxx\AppData\Roaming\npm\node_modules\web3
> lerna bootstrap

'lerna' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\wanxxx\AppData\Roaming\npm
+-- truffle-config@1.0.1
`-- truffle-expect@0.0.3

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "ins
tall" "-g" "truffle-expect" "truffle-config" "web3"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! web3@1.0.0-beta.4 postinstall: `lerna bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web3@1.0.0-beta.4 postinstall script 'lerna bootstrap'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the web3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     lerna bootstrap
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs web3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls web3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Windows\system32\npm-debug.log

How to resolve the issue? I can install everything on Windows 10 professional on my laptop.

2

Why don't you simply run npm install -g truffle to install truffle,, with TestRPC as your Ethereum client, you can install TestRPC using the command npm install -g ethereumjs-testrpc

It worked for me this way

  • I did run npm install -g truffle before npm install -g truffle-expect truffle-config web3. I followed an instruction which needs to do both these steps. The truffle init cannot run right now (popup a js message box) so I thought it's caused by the failed installation. – dc7a9163d9 Jul 21 '17 at 5:06
  • Did you install windows build tools? if not try npm install -g –production windows-build-tools,, and can you copy/ past the message that you get when you run truffle init – Jamal D Jul 21 '17 at 5:27
  • I cannot reproduce the error message now. Now truffle init finished without any error. – dc7a9163d9 Jul 21 '17 at 19:58
2

A recent beta.6 change to the postinstall script path for lerna fails on Windows. Until it's fixed you can npm install lerna then npm install web3@1.0.0-beta.5.

0

I had a bit of an issue with this a few days ago when updating truffle. I used yarn instead and didn't have any issues. npm has been really finicky lately for me...

the command with yarn would be:

yarn global add truffle

protected by Community Jul 24 '17 at 13:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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