SAFE Developer Hub (https://hub.safedev.org)

thank you
I’ll try it using the non-mock browser meantime.
Be interesting to see how many folks have run through this tutorial without issues. - What did they do that I didn’t?

Using Debian 9, node v8.11.1, npm v5.6.0 it fails for me at $ npm install @maidsafe/safe-node-app --save

user@user1:~/safe_examples/safe_app_electron_quick_start $ npm install @maidsafe/safe-node-app --save
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated natives@1.1.3: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.

> ref@1.3.5 install /home/user/safe_examples/safe_app_electron_quick_start/node_modules/ref
> node-gyp rebuild

gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.9.0-4-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/safe_examples/safe_app_electron_quick_start/node_modules/ref
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ref@1.3.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ref@1.3.5 install 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!     /home/user/.npm/_logs/2018-04-28T11_38_10_445Z-debug.log

OK I got a bit further by installing yarn and build-essential

But now I get $ npm install @maidsafe/safe-node-app --save

ERROR: [Errno 2] No such file or directory: 'run'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @maidsafe/safe-node-app@0.8.1 postinstall: `yarn run install-prod && node install-dev-libs.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @maidsafe/safe-node-app@0.8.1 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!     /home/user/.npm/_logs/2018-04-28T11_50_52_927Z-debug.log

Relevant part of the log (I think):

334 verbose pkgid @maidsafe/safe-node-app@0.8.1
335 verbose cwd /home/user/safe_examples/safe_app_electron_quick_start
336 verbose Linux 4.9.0-4-amd64
337 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "@maidsafe/safe-node-app" "--save"
338 verbose node v8.11.1
339 verbose npm  v5.6.0
340 error code ELIFECYCLE
341 error errno 1
342 error @maidsafe/safe-node-app@0.8.1 postinstall: `yarn run install-prod && node install-dev-libs.js`
342 error Exit status 1
343 error Failed at the @maidsafe/safe-node-app@0.8.1 postinstall script.
343 error This is probably not a problem with npm. There is likely additional logging output above.
344 verbose exit [ 1, true ]

Perhaps all the documentation under docs.maidsafe.net could be merged into the devhub instead of having two separate websites.

8 Likes

I’ll try to setup a Debian 9, but I tihnk you are right it’s all related to npm/yarn versions, I’ll try to find out which is the minimum reqs around the versions. I’ve been having this type of problems recently with other projects with npm vs. yarn.

1 Like

sorry if I missed it, but I don’t think this is linked in the website. Would be great if new visitors could find this great resource easily :slight_smile:

Recently, I had to upgrade to Debian “testing” in order for safe_authenticator to compile without error.

I have got it working on Debian 9 now installing build-essential, updating npm to 6.0.0 and updating yarn via npm. Not sure which of these solved the problem I was having, but my guess is the yarn update.

3 Likes

I too did a yarn update but npm and node need to be the latest as well
On Debian type distros, (Im on 18.04 beta) you are always going to need build-essential for anything interesting.

So which versions of npm and node are you using?

 NPM version
6.0.0

node version
v9.11.1

Try my utterly trivial wee version tool

3 Likes

Hey thanks - upgrading to node v9.11.1 worked. :+1:

3 Likes

Thanks @JPL, @Southside for all the info. Based on your feedback from last week, we have updated the tutorials to recommend using node v8.11.1 (which comes with npm v5.6.0) which is also the version recommended on the nodejs site. From my tests that version works fine on Debian 8 and 9.4, so it seems the problem you faced were related to actually using some version of yarn.

On the other hand, in the tutorials we are not suggesting the use of yarn but just npm, and it was effectively to avoid the need to have an additional dependency, to keep it as simple as possible. I’ll see if I add a comment mentioning that using yarn is totally optional and recommend a version for it which works with nodejs v8.11.1, but users don’t really need yarn for quick starting, specially if they are new to nodejs/npm.

4 Likes

My community friends…

I’ve created a new topic to keep all future DevHub feedback items/suggestions here.

I’m going to be ‘on-point’ for this one if you want to address the feedback to me (or not… up to you :smiley:).

Closing off this one now.
David.


1 Like