storj-archived / storjshare-daemon

Deprecated. Docker Daemon + CLI for farming data on the Storj v2 network.
https://storj.io/share.html
GNU Affero General Public License v3.0
331 stars 74 forks source link

npm install fail with permission errors (freeBSD) #327

Closed p145085 closed 6 years ago

p145085 commented 6 years ago

Package Versions

Replace the values below using the output from storjshare --version.

N/A

Replace the values below using the output from node --version.

v9.3.0

Expected Behavior

Program expected to install storjshare-daemon.

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces or log output in the back ticks below.

https://pastebin.com/SLtBQaXK
npm ERR! code 1
npm ERR! Command failed: /usr/local/bin/git clone --depth=1 -q -b master git://github.com/zipang/daemon.node.git /root/.npm/_cacache/tmp/git-clone-9c8a82f4
npm ERR! /root/.npm/_cacache/tmp/git-clone-9c8a82f4/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-02-26T12_19_22_280Z-debug.log
# /root/.npm/_logs/2018-02-26T12_19_22_280Z-debug.log

76 verbose stack Error: Command failed: /usr/local/bin/git clone --depth=1 -q -b master git://github.com/zipang/daemon.node.git /root/.npm/_cacache/tmp/git-clone-9c8a82f4
76 verbose stack /root/.npm/_cacache/tmp/git-clone-9c8a82f4/.git: Permission denied
76 verbose stack
76 verbose stack     at ChildProcess.exithandler (child_process.js:272:12)
76 verbose stack     at ChildProcess.emit (events.js:159:13)
76 verbose stack     at maybeClose (internal/child_process.js:943:16)
76 verbose stack     at Socket.stream.socket.on (internal/child_process.js:363:11)
76 verbose stack     at Socket.emit (events.js:159:13)
76 verbose stack     at Pipe._handle.close [as _onclose] (net.js:568:12)
77 verbose cwd /usr/home/energetic
78 verbose FreeBSD 11.1-RELEASE
79 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "storjshare-daemon"
80 verbose node v9.3.0
81 verbose npm  v5.6.0
82 error code 1
83 error Command failed: /usr/local/bin/git clone --depth=1 -q -b master git://github.com/zipang/daemon.node.git /root/.npm/_cacache/tmp/git-clone-9c8a82f4
83 error /root/.npm/_cacache/tmp/git-clone-9c8a82f4/.git: Permission denied
84 verbose exit [ 1, true ]

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as much detail as possible.

Am running 'FreeBSD 11.1-RELEASE'

  1. Install dependencies; Git, nodejs, npm, python2.7, gcc
  2. Attempt to install storjshare-daemon with npm both as regular user and sudo user.
  3. Error.
stefanbenten commented 6 years ago

Did you install npm as root or normal user? Can you also post the complete log of the install process including your executed command?

p145085 commented 6 years ago

npm was installed by a normal user added to the wheel group and using 'sudo'.

https://pastebin.com/1ckKD7g2 - Install process initiated by sudo npm install --global storjshare-daemon

stefanbenten commented 6 years ago

You should not install it with sudo, which is stated in the Install Instructions (no root account). Just enter npm install -g storjshare-daemon and post the errors again please, thanks! 👍

p145085 commented 6 years ago

https://pastebin.com/HMzPK34m - "Please try running this command again as root/Administrator."

heh, I'm not sure if installing node and/or npm or the other packages as normal user account is possible either. Fairly certain that I need to install the packages as root.

littleskunk commented 6 years ago

@stefanbenten sudo is fine. That will still run the installation as normal user with root privilages. Logged in as root while running this command is a problem.

@p145085 However. I think more important is the nodejs version. You are running the unstable develop branch. Please try it again with nodejs LTS.

p145085 commented 6 years ago

@littleskunk - https://pastebin.com/8easRbhs

node --version = v8.9.3 npm --version = 5.6.0

Looks like the exact same error as earlier, seems likely that there is a permission fault somewhere on my local machine.

littleskunk commented 6 years ago

That looks better. Now the error message is normal for root user. Sudo should be fine but make sure you are logged in as normal user and not as root.

If that is not working you can add --unsafe-perm. This is a security risk and you should try to avoid it.

p145085 commented 6 years ago

https://pastebin.com/9SKiWpwT - npm install -g storjshare-daemon https://pastebin.com/TWPgibU1 - npm install -g --unsafe-perm storjshare-daemon https://pastebin.com/94Qgx57u - sudo npm install -g storjshare-daemon https://pastebin.com/TqjjjJw1 - sudo npm install -g --unsafe-perm storjshare-daemon

Attempted in chronological order, I'm reviewing my user account permissions at the moment to see if there's anything going on there.

tab2003 commented 6 years ago

Is there any update about the issue?

RichardLitt commented 6 years ago

👋 Hey! Thanks for this contribution. Apologies for the delay in responding!

We've decided to rearchitect Storj, so that we can scale better. You can read more about this decision here. This means that we are entirely focused on v3 at the moment, in the storj/storj repository. Our white paper for v3 is coming very, very soon - follow along on the blog and in our Rocketchat.

As this repository is part of the v2 network, we're no longer maintaining this repository. I am going to close this for now. If you have any questions, I encourage you to jump on Rocketchat and ask them there. Thanks!