Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sudo install via npm v5 or above (--unsafe-perm) #146

Closed
ghost opened this issue Feb 27, 2018 · 5 comments
Closed

Sudo install via npm v5 or above (--unsafe-perm) #146

ghost opened this issue Feb 27, 2018 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 27, 2018

When installing the latest ijavascript via NPM globally to usr/local/ I get the error:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.


When installing ijavascript via NPM globally but with prefix set to local user directory ~/.npm-packages, it installs just find but cannot be executed i.s. "command not found".


Any help installing is greatly appreciated. I am trying to use this with Hydrogen for Atom.

System versions:
Node - 9.5.0
NPM - 5.6.0
macOS - 10.13.3

@n-riesco
Copy link
Owner

@mink-code

When installing ijavascript via NPM globally but with prefix set to local user directory ~/.npm-packages, it installs just find but cannot be executed i.s. "command not found".

If prefix is set to ~/.npm-packages, the binaries will be located in ~/.npm-packages/bin. You need to make sure $HOME/.npm-packages/bin is in your PATH.


When installing the latest ijavascript via NPM globally to usr/local/ I get the error:

IJavascript depends on zeromq and sudo installations of zeromq with npm@5 don't work any longer, unless the flag --unsafe-perm is used. I.e. if you want to install IJavascript using sudo and npm@5 you need to run:

sudo npm install -g --unsafe-perm ijavascript

@ghost
Copy link
Author

ghost commented Feb 28, 2018

Ah, of course, thank you. Went with the first solution.
ijsinstall runs now but can't find jupyter and ipython... are both required or is Hydrogen enough?

@ghost
Copy link
Author

ghost commented Feb 28, 2018

I installed both but Atom/Hydrogen now says:

'ijskernel' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

@n-riesco
Copy link
Owner

ijsinstall runs now but can't find jupyter and ipython... are both required or is Hydrogen enough?

If you want to use IJavascript with the latest Hydrogen, then you need to have jupyter.

'ijskernel' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

This means that Hydrogen doesn't have $HOME/.npm-packages/bin in its PATH. If you can't figure out the reason for this, then I'd install IJavascript's kernel spec with full paths, like this:

ijsinstall --spec-path=full

The drawback of using full paths is that the kernel spec needs reinstalling (i.e. ijsinstall --spec-path=full) every time node is updated (so that the kernel spec points to the new location of node).

@n-riesco n-riesco changed the title Install via NPM on Mac not working Sudo install via NPM@5 Feb 28, 2018
@ghost
Copy link
Author

ghost commented Mar 14, 2018

ijsinstall --spec-path=full did the trick. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant