Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Global mode installation issue #323

Open
HySoaKa opened this issue May 11, 2017 · 4 comments
Open

Global mode installation issue #323

HySoaKa opened this issue May 11, 2017 · 4 comments

Comments

@HySoaKa
Copy link

HySoaKa commented May 11, 2017

Hi,

I encountered a problem during installation of Jupyter Dashboard Server. Indeed, I've tried to install it globally with : npm install -g jupyter-dashboards-server knowing that I'm using root.
And this is the error:

npm WARN deprecated [email protected]: update to @phosphor/disposable package
npm WARN deprecated [email protected]: update to @phosphor/signaling package
npm WARN deprecated [email protected]: update to @phosphor/algorithm package
npm WARN deprecated [email protected]: update to @phosphor/commands package
npm WARN deprecated [email protected]: package is no longer maintained
npm WARN deprecated [email protected]: update to @phosphor/application package
npm WARN deprecated [email protected]: use the @phosphor/ packages
npm WARN deprecated [email protected]: update to @phosphor/dragdrop package
npm WARN deprecated [email protected]: update to @phosphor/messaging package
npm WARN deprecated [email protected]: update to @phosphor/properties package
npm WARN deprecated [email protected]: update to @phosphor/widgets package
npm WARN deprecated [email protected]: update to @phosphor/widgets package
npm WARN deprecated [email protected]: update to @phosphor/widgets package
npm WARN deprecated [email protected]: update to @phosphor/collections package
npm WARN deprecated [email protected]: update to @phosphor/widgets package
/usr/local/bin/jupyter-dashboards-server -> /usr/local/lib/node_modules/jupyter-dashboards-server/bin/jupyter-dashboards-server

> [email protected] install /usr/local/lib/node_modules/jupyter-dashboards-server/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)


> [email protected] postinstall /usr/local/lib/node_modules/jupyter-dashboards-server/node_modules/phosphor-dragdrop
> npm dedupe

npm WARN locking Error: EACCES: permission denied, open '/tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE'
npm WARN locking     at Error (native)
npm WARN locking  /tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock failed { [Error: EACCES: permission denied, open '/tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   syscall: 'open',
npm WARN locking   path: '/tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE' }
npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv "/logiciels/node-v5.7.0-linux-x64/bin/node" "/usr/bin/npm" "dedupe"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0
npm ERR! path /tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open

npm ERR! Error: EACCES: permission denied, open '/tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, open '/tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'open',
npm ERR!   path: '/tmp/npm-cache/_locks/staging-3a08f0df5026584d.lock.STALE' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/jupyter-dashboards-server/node_modules/phosphor-dragdrop/npm-debug.log
/usr/local/lib
└── (empty)

npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv "/logiciels/node-v5.7.0-linux-x64/bin/node" "/usr/bin/npm" "install" "-g" "jupyter-dashboards-server"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `npm dedupe`
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'npm dedupe'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phosphor-dragdrop package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm dedupe
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phosphor-dragdrop
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls phosphor-dragdrop
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log
npm ERR! code 1

As you can see above, I'm using:

node v5.7.0
npm  v3.6.0

And so, if I've understood correctly, the error is due to the npm dedupe.
But oddly enough, when I've installed it locally, it worked like a charm. And an npm install -g jupyter-dashboards-server puts executable files and man pages in the right directories.

For me, technically a global installation is like a local installation with a certain prefix, and the link of the bin and man to the right dirs.

So why the npm dedupe didn't work with the global mode ?

PS: I've assumed that this is an issue that affect Jupyter Dashboard Server.

@parente
Copy link
Member

parente commented May 11, 2017

At one point, installing using sudo npm was bad. I don't know if this is still the case. Try using sudo -H per this article: http://hood.ie/blog/why-you-shouldnt-use-sudo-with-npm.html

@HySoaKa
Copy link
Author

HySoaKa commented May 12, 2017

@parente Thank you for your answer. I didn't use sudo, I've tried to install the package with a root account.

In fact in the beginning I've tried to install jupyter-dashboards-server using Ansible with a non root account. And seeing that it didn't work (and having a EACCESS error) I've tried to do it directly with the root account on the machine.

PS: I've tried sudo -H npm install jupyter-dashboards-server with a user having root privileges, and it didn't work.

@agapoorv
Copy link

Hi. Were you able to find a solution to this? I am facing the exact same issue and have the same requirement of installing it as a root account.

Thanks.

@HySoaKa
Copy link
Author

HySoaKa commented Sep 18, 2017

@agapoorv The only solution that worked for me was to install it without the global option, specifying a prefix path with --prefix option.

You will find more details here: https://docs.npmjs.com/files/folders#tl-dr

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

3 participants