Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

truffle unpack react fails on windows and ubuntu - needs to replace web3 version with 1.3.0 #3595

Closed
1 task done
Dmdv opened this issue Dec 11, 2020 · 11 comments
Closed
1 task done

Comments

@Dmdv
Copy link

Dmdv commented Dec 11, 2020


Issue

Running truffle unpack react fails

Steps to Reproduce

truffle unpack react

Actual Results

npm ERR! code 1
npm ERR! path D:\smartcontracts\crowdsales-experiments\client\node_modules\sha3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
npm ERR!   addon.cpp
npm ERR! d:\smartcontracts\crowdsales-experiments\client\node_modules\sha3\src\addon.cpp(49): warning C4316: 'SHA3Hash': object allocated on the heap may not be aligned 32 [D:\smartcontracts\crowdsales-experiments\client\node_modules\sha3\build\sha3.vcxproj]
npm ERR! d:\smartcontracts\crowdsales-experiments\client\node_modules\sha3\src\addon.cpp(83): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [D:\smartcontracts\crowdsales-experiments\client\node_modules\sha3\build\sha3.vcxproj]
npm ERR! gyp info it worked if it ends with ok

Environment

  • Operating System: Windows 10 and Ubuntu 20
  • Ethereum client:
  • Truffle version (v5.1.57):
  • node version (v15.4.0):
  • npm version (7.0.15):
@Dmdv
Copy link
Author

Dmdv commented Dec 11, 2020

It relates to sha3 issues
When cd client and npm ci, it fails with the same error
But npm i works

@Dmdv
Copy link
Author

Dmdv commented Dec 11, 2020

I confirm the same in Ubuntu 20

image

@Dmdv Dmdv changed the title truffle unpack react fails on windows truffle unpack react fails on windows and ubuntu Dec 11, 2020
@Dmdv
Copy link
Author

Dmdv commented Dec 11, 2020

I fixed it in Ubuntu using

"web3": "^1.3.0"

in package.json

@Dmdv
Copy link
Author

Dmdv commented Dec 11, 2020

And the same works for Windows

Please, update your truffle unpack react

@Dmdv Dmdv changed the title truffle unpack react fails on windows and ubuntu truffle unpack react fails on windows and ubuntu - needs to replace web3 version with 1.3.0 Dec 11, 2020
@haltman-at
Copy link
Contributor

Hi! We haven't updated to web3 1.3 because of this bug that was introduced in 1.2.10 but still hasn't been fixed yet. I may have to go pester them about it -- or submit a PR myself...

@Dmdv
Copy link
Author

Dmdv commented Dec 12, 2020

That could save hours for others )

@eggplantzzz
Copy link
Contributor

eggplantzzz commented Dec 14, 2020

@Dmdv What package.json are you editing? For the record, I just confirmed that on a mac this box has no problems unboxing successfully (aside from some ugly warnings in the console).

@Dmdv
Copy link
Author

Dmdv commented Dec 15, 2020

@eggplantzzz When unpacking crashed, I cd into client directory and edit package.json in the client directory.
After this, I run npm i to complete.

@eggplantzzz
Copy link
Contributor

Ok thanks for reporting this @Dmdv!

@haltman-at
Copy link
Contributor

Well, I submitted this PR to web3, hopefully they merge and release it before too long so we can upgrade...

@Dmdv
Copy link
Author

Dmdv commented Dec 25, 2020

It works!

@Dmdv Dmdv closed this as completed Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants