Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Installing mattermost-redux for a global package fails #772

Open
marklagendijk opened this issue Feb 12, 2019 · 2 comments
Open

Installing mattermost-redux for a global package fails #772

marklagendijk opened this issue Feb 12, 2019 · 2 comments

Comments

@marklagendijk
Copy link

Summary

Installation of mattermost-redux fails due to git dependency.

Steps to reproduce

  • sudo npm i -g mattermost-redux

Expected behavior

The module should install without error.
The issue occurs if you want to install a package (for example an cli) which uses mattermost-redux globally.

Observed behavior

npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/enahum/redux-offline.git /root/.npm/_cacache/tmp/git-clone-f7f32218
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f7f32218': Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-12T14_40_06_244Z-debug.log

Possible fixes

  • Remove the redux-offline dependency as git based dependency. If you must use your own version of this package, at least publish it to npm.
  • Split mattermost-redux into different packages. The idea with npm is that packages are small. This package now contains both the client and usages of the client. I propose to at least create mattermost-http-client and mattermost-ws-client as packages. Note: you can still keep the code in one repo.
@enahum
Copy link
Contributor

enahum commented Feb 12, 2019

@marklagendijk after reading the error output looks like you have permissions issues to install it in that folder

@marklagendijk
Copy link
Author

@enahum that is correct.
However, this issue happens with the default way Node.js is installed on Ubuntu / Debian systems, when installing git based dependencies.
The git dependencies have two issues that normal dependencies don't have:

  • They require git to be installed on the system.
  • They don't work with the default way Node.js is installed on Ubuntu / Debian.

The background of this is that I'm making a simple Node.js mattermost-cli tool to send Mattermost chat messages from our Jenkins server.
The tool works, but these two issues prevent me from installing it on the Jenkins builders.

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

2 participants