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

cannot install drizzle on macos and windows #46

Open
GiovanniCapizzi opened this issue Oct 6, 2019 · 18 comments
Open

cannot install drizzle on macos and windows #46

GiovanniCapizzi opened this issue Oct 6, 2019 · 18 comments

Comments

@GiovanniCapizzi
Copy link

I can't add drizzle to my project because of scrypt module which fails to build. Already found this, and it seems to happen with NodeJs 12. I wouldn't like to try with Node10 because scrypt doesn't seems to be manteined anymore, is there hope for new fix soon?

# define NAN_DEPRECATED __attribute__((deprecated))
                                      ^
8 warnings and 7 errors generated.
make: *** [Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/12.11.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/12.11.1/bin/node" "/usr/local/Cellar/node/12.11.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
[...]
gyp ERR! node -v v12.11.1
@jklepatch
Copy link
Contributor

This does not seem to be a problem with Drizzle directly, but with the scrypt dependency of web3.

Not sure to understand why you don't want to try with NodeJS 10. NodeJS is the LTS (Long Term Support) version of NodeJS and for most cases it's the recommended version.

@GiovanniCapizzi
Copy link
Author

GiovanniCapizzi commented Oct 7, 2019

Yes, I am sorry, I was not so clear, my request was addressed to know if this dependency would be upgraded soon, Scrypt has been deprecated, so if I downgrade NodeJS, it would work only for that version and I won't be able to upgrade only for one package, in the future. I asked for future maintainability of a new project.

UPDATE:
I didn't see that was a web3 dependency, sorry.

@jklepatch
Copy link
Contributor

Can you try with the latest version of Drizzle(in your package.json you can point to the latest commit of this repo).

Drizzle has updated to web3 1.2.1` (not released to npm yet), and it might solve your problem.

@GiovanniCapizzi
Copy link
Author

With yarn or npm I get this error:
error Can't add "root": invalid package version undefined.
Is it because package.json doesn't not specify a version?

@jklepatch
Copy link
Contributor

jklepatch commented Oct 8, 2019 via email

@GiovanniCapizzi
Copy link
Author

I tried with "yarn add" command. Same result if I put "package":"git://...#commit" in the package.json.

If I install it with NPM it gets a webpack error. I can't put any logs here because I am without my laptop right now, sorry.

@cds-amal
Copy link
Member

@GiovanniCapizzi can you provide a repo that demonstrates the issue? It would be helpful for us to investigate.

@GiovanniCapizzi
Copy link
Author

GiovanniCapizzi commented Oct 13, 2019

Just following this tutorial. If you want to reproduce the issue just create a simple node (12) project (like react) and issue the yarn add command. If you want I can prepare and upload a repo for you, just let me know.

@cds-amal
Copy link
Member

cds-amal commented Oct 15, 2019

Hi @GiovanniCapizzi,

Interesting that it fails on node v12.x.x for both Windows and OS X.
Can you specify some details about your environment to help us reproduce this issue?

  • version of node (eg v12.12.0)
  • Windows Version, and environment. Are you using Windows Subsystem for Linux (WSL)?

Thanks in advance!

@msicilia
Copy link

I have same issue with MacOS Catalina 10.15.

I know I can revert to Node 10 and it works, but it would be great to have a fix for Node 12 soon.

Many thanks in advance.

@cds-amal
Copy link
Member

Thank you @msicilia, this is quite helpful!

@GiovanniCapizzi
Copy link
Author

Really sorry I forgot to answer due to work.
On MacOS with Catalina now, my Node version is v12.11.1.
On Windows I have 12.10.0 without using WSL.
No particularly environment used, just the windows-build-tools installed in Node to build stuffs.

@cds-amal
Copy link
Member

Thanks @GiovanniCapizzi ! I'll work on reproducing this on OS X with your versions. Please note, that for now, we only support WSL windows build environment.

@GiovanniCapizzi
Copy link
Author

This does not seem to be a problem with Drizzle directly, but with the scrypt dependency of web3.

Not sure to understand why you don't want to try with NodeJS 10. NodeJS is the LTS (Long Term Support) version of NodeJS and for most cases it's the recommended version.

NodeJS just updated the LTS version, now we have 12.13.0 LTS in just few days 😆

@adrianmcli
Copy link
Contributor

@GiovanniCapizzi

I ran the following under Node v12.13.0 on MacOS 10.14.6 (Mojave) and it worked fine:

yarn init -y
yarn add @drizzle/store @drizzle/react-plugin @drizzle/react-components

That being said, I did get a similar error on v13.0.1:

1 warning and 1 error generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/adrianli/n/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/adrianli/n/bin/node" "/Users/adrianli/n/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/adrianli/dev/temp/node_modules/sha3

However, this seems to be because of some libraries Web3.js is using. I've made an issue here: web3/web3.js#3181

@GiovanniCapizzi
Copy link
Author

Maybe this is caused by the same web3.js which could use this deprecated module. I will try again updating my node version.

#WARNING!!! This module is deprecated. Instead, use https://nodejs.org/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback

@theabdulmateen
Copy link

So is there a fix, I have been struggling with the same error. can't find a fix or a workaround that works anymore.

Thanks

@Suedo
Copy link

Suedo commented Nov 5, 2020

Same problem.

Environment:

Ubuntu 20.04 on windows via WSL2. 
Node version : 12.19.0

I get the error when I use npm install -g drizzle

However, following the link that OP provided, when I use the command npm install -g @drizzle/store , I no longer face any issues.

Are we supposed to install @drizzle/store if we want to use drizzle? Asking because the page on truffle suite says drizzle

image


Update

It seems like @drizzle/store is the way to go. The Drizzle QuickStart page says to use npm install --save @drizzle/store. I guess you guys should update the Truffle Suite page ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants