-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Not usable on Node.js 12 #2070
Comments
Hey @filips123, thanks for bringing this up. This incompatibility is a known issue but unfortunately it's not something we can "fix quickly". Firstly, upgrading to Web3.js v1.0.0-beta.55 is not an option, since there are breaking changes that would have to wait until Truffle v6. This upgrade has been something we've been attempting for at least 6 months, without success. I won't say more now, but expect an announcement soon about Web3.js versioning. A number of projects having been working with Web3.js directly and we are in the process of outlining a path forward here. As for the sha3 issue, we can look into upgrading that; this may be more feasible. Feel free to open a pull request if you have a clear understanding of the work entailed. Sorry about this. I understand it's frustrating—Node v12 has lots of features that I can't wait to get my hands on! Please bear with us and the rest of the community as we seek to address the limitations preventing this from working (or please help if you can!) |
And you can also see my Travis CI build with updated dependencies: |
Given that this is a known problem and looks like it will take some time to fix, it would be very helpful to document the problem in the Truffle installation instructions page. |
Another issue regarding Node 12 (reproduction on clean project):
If using 11.x test command is ok. |
I'm using |
A quick solution is to use Yarn resolutions which should force correct new version. Note that it is only supported in Yarn (not NPM) and it will still produce error output (but it won't fail installation). You need to add this to {
"resolutions": {
"eth-lib/keccakjs/sha3": "^1.2.3",
"web3/web3-eth/web3-eth-accounts/scrypt.js": "^0.3.0"
}
} |
This will probably be fixed in next version of Web3. |
With the announcement of Web3 versioning, is there more that can now be said about node 12 support? |
I was just going to inquire, @DavidBurela. I'll dig in and see what I can find. |
We're actively working on it. I believe ethereumjs-vm is the last piece of the puzzle. |
Can y'all try v5.0.34 to confirm working Node v12 support? |
I still have issues. Truffle v5.0.34 (core: 5.0.34) Repo steps:
|
Currently working in Windows 10 - reloading node.js via .msi installer worked. https://nodejs.org/en/download/ Current specs: |
Status update: web3 supporting node 12 is a great step forward, but we still cannot use node 12 in our project because of Looks like |
yep same result here on as David B.. Im on ubuntu1604 all other parts of the suite work ok if on node v12+ ? i want to drizzle.. the tests i can do in remix on its in memory chain Truffle v5.1.0 (core: 5.1.0) |
Same issue, easiest way out of this issue is to install node v11.15.0. As node v12 and v13 both will encounter the issue. |
This is not a solution, but a workaround while this is being fixed:
The above will install node v10 long-term support Now you can successfully run
Hope it helps! |
thanks we use v10 node now...
*John D Allen.*
*Leveridge Systems INC. *
*T +1 417 849 0705 ** CST | [email protected]
<[email protected]> | https://www.leveridgesystems.com
<https://www.leveridgesystems.com> | linkedin.com/in/johndallen1
<http://linkedin.com/in/johndallen1> | skype john.allen_67
https://www.yourhashgraphtoken.com <https://www.yourhashgraphtoken.com>*
This email is sent on behalf of Leveridge Systems INC. Reg.Ein 86-0905636.
Reg Missouri Charter #01082460.
The information contained in this email and any attached files is
confidential and intended solely for the addressee(s). The email may be
legally privileged or prohibited from disclosure and unauthorized use. If
you are not the named addressee you may not use, copy, or disclose this
information to any other person. If you received this message in error
please notify the sender immediately and delete it from your system.
…On Wed, Dec 4, 2019 at 12:57 AM Salvador Guerrero ***@***.***> wrote:
This is not a solution, but a workaround while this is being fixed:
1. Uninstall node
2. Install nvm <https://github.com/nvm-sh/nvm>
3. Install node v10 LTS by running: $ nvm install 10 --lts
The above will install node v10 long-term support
Now you can successfully run
$ truffle develop
> compile
> test
Hope it helps!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2070?email_source=notifications&email_token=ADGDUXNQPIHXNSPKAXVZTLTQW5IEHA5CNFSM4HSCUWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF36IOI#issuecomment-561505337>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGDUXNRQM63SFWWEVBX4PDQW5IEHANCNFSM4HSCUWOA>
.
|
What are the steps remaining to make this work on Node v12 (which is now also on LTS)? |
@adrianmcli see mochajs/mocha#4009. Don't have the bandwidth currently to do so myself, but feel free to smoke test my fork of mocha (https://github.com/CruzMolina/mocha/tree/v5.2.1) with truffle bundled. |
Is there any progress to make this work on Node v12 (which is currently on LTS)? |
Idk. I went back to 10
…On Mon, Jan 6, 2020, 2:54 PM EL Yusubov ***@***.***> wrote:
Is there any progress to make this work on Node v12 (which is currently on
LTS)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2070?email_source=notifications&email_token=ADGDUXIT4GMKA44RUMTFSYLQ4OK7ZA5CNFSM4HSCUWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGX7KA#issuecomment-571309992>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGDUXKYMG6LJFPH2JKN3ETQ4OK7ZANCNFSM4HSCUWOA>
.
|
Hey everyone! ✋ We just published an experimental prerelease that uses a fork of mocha with one tiny change. 🤞 Our node 12 CI appears to be pleased and smoke testing locally w/ node 12 LTS seems to be fine. Please give it a try and let us know if things work!
|
Thanks for the lifesaver @CruzMolina, reporting success over here too! |
Hey @CruzMolina can you plz help me with that? I have installed nodejs 12.14.1 ... how can I apply your solution? thx |
Hi @jeffor12 ! You should be able to re-install the npm un -g truffle
npm i -g truffle@nodeLTS You can verify the truffle unbox metacoin
truffle develop
develop> test If the test run completes without throwing an error, you should be good to go. |
Hi @CruzMolina! I found a solution for my test error: I had to downgrade to node 10.18.1. then all went well... |
Hey @jeffor12 , are you confirming that Can you share your truffle version? |
right now its |
@jeffor12 , it sounds like you have You'll need to |
@CruzMolina thanks, that worked ! |
Will this be fixed? Seems like a major issue. Workaround does fix it for me. |
go back to node 10
*John D Allen.*
*T +1 417 849 0705 ** CST | [email protected]
<[email protected]> | https://www.leveridgesystems.com
<https://www.leveridgesystems.com> | linkedin.com/in/johndallen1
<http://linkedin.com/in/johndallen1> | skype john.allen_67
https://www.yourhashgraphtoken.com <https://www.yourhashgraphtoken.com>*
Leveridge Systems INC. Reg Missouri Charter #01082460. The information
contained in this email and any attached files is confidential and intended
solely for the addressee(s). The email may be legally privileged or
prohibited from disclosure and unauthorized use. If you are not the
named addressee you may not use, copy, or disclose this information to any
other person. If you received this message in error please notify the
sender immediately and permanently delete it from your system.
…On Fri, Mar 6, 2020 at 5:08 PM pdlla ***@***.***> wrote:
Will this be fixed? Seems like a major issue.
Workaround does fix it for me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2070?email_source=notifications&email_token=ADGDUXMHUQDM565U6DCZEP3RGF7AJA5CNFSM4HSCUWOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEODEPLA#issuecomment-596002732>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGDUXJSM7QXPJTLMB5COETRGF7AJANCNFSM4HSCUWOA>
.
|
This was a great and informative thread that helped me quickly understand my problem and find a resolution. My thanks to everyone involved. |
I've tried:
and have the following:
but am still experiencing the error:
|
Hey @CruzMolina! Thanks! It worked here like a charm :) |
@CruzMolina |
@CruzMolina TypeError: Error parsing C:/Users/.../contracts/Migrations.sol: Cannot destructure property 'body' of 'undefined' as it is undefined. |
@RLNYC: That seems like an unrelated error. Would you mind opening a new issue and elaborating on it there? Thanks! Meanwhile, I'm going to close this issue as it should be resolved. |
Issue
Truffle and its sub-packages (
truffle-contract
) are unusable on Node.js 12.This needs to be fixed quickly because it currently makes any package that uses
truffle-contract
unusable on Node.js 12.Details
Node.js 12 removed some deprecated functions from the V8 add-on API which are used by some of Truffle dependencies.
One of that dependencies is
[email protected]
which is used byeth-lib#keccakjs
. To fix this, you need to update all dependenciesyarn.lock
. This should install[email protected]
which has fixed compatibility with Node.js 12.Another dependency with problems is
[email protected]
which is used byweb3#web3-eth#web3-eth-accounts
. It was fixed in[email protected]
. Problem with this is that the fixed version is used only in[email protected]
which is incompatible with Truffle (#1690). To fix this, you need to update Truffle to support[email protected]
which will use the fixed version ofscrypt.js
.Maybe there are also some other broken dependencies.
Logs from CI
Error with
sha3
:https://travis-ci.com/filips123/truffle/jobs/204732468
Error with
scrypt
:https://travis-ci.com/filips123/EthAvatar.JS/jobs/204728583
Environment
The text was updated successfully, but these errors were encountered: