jupyter / dashboards_server

[RETIRED] Server that runs and renders Jupyter notebooks as interactive dashboards
Other
181 stars 48 forks source link

Global mode installation issue #323

Open HySoaKa opened 7 years ago

HySoaKa commented 7 years ago

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 phosphor-disposable@1.0.5: update to @phosphor/disposable package
npm WARN deprecated phosphor-signaling@1.2.0: update to @phosphor/signaling package
npm WARN deprecated phosphor-arrays@1.0.6: update to @phosphor/algorithm package
npm WARN deprecated phosphor-keymap@0.8.0: update to @phosphor/commands package
npm WARN deprecated phosphor-codemirror@0.0.1: package is no longer maintained
npm WARN deprecated phosphor-di@0.9.0: update to @phosphor/application package
npm WARN deprecated phosphor-domutil@1.2.0: use the @phosphor/ packages
npm WARN deprecated phosphor-dragdrop@0.9.1: update to @phosphor/dragdrop package
npm WARN deprecated phosphor-messaging@1.0.6: update to @phosphor/messaging package
npm WARN deprecated phosphor-properties@2.0.0: update to @phosphor/properties package
npm WARN deprecated phosphor-commandpalette@0.2.0: update to @phosphor/widgets package
npm WARN deprecated phosphor-dockpanel@0.9.7: update to @phosphor/widgets package
npm WARN deprecated phosphor-boxengine@1.0.1: update to @phosphor/widgets package
npm WARN deprecated phosphor-queue@1.0.5: update to @phosphor/collections package
npm WARN deprecated phosphor-nodewrapper@1.0.6: update to @phosphor/widgets package
/usr/local/bin/jupyter-dashboards-server -> /usr/local/lib/node_modules/jupyter-dashboards-server/bin/jupyter-dashboards-server

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

> phosphor-dragdrop@0.9.1 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! phosphor-dragdrop@0.9.1 postinstall: `npm dedupe`
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the phosphor-dragdrop@0.9.1 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 commented 7 years ago

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 commented 7 years ago

@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 commented 6 years ago

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 commented 6 years ago

@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