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

Publishing is also installing package #6

Closed
neworld opened this issue Oct 15, 2018 · 3 comments
Closed

Publishing is also installing package #6

neworld opened this issue Oct 15, 2018 · 3 comments

Comments

@neworld
Copy link
Contributor

neworld commented Oct 15, 2018

I am trying to publish package into npm and got error about missing permissions:

npm ERR! Error: EACCES: permission denied, symlink '/some/path/build/jdeploy' -> '/usr/lib/node_modules/hello-world'                                       
npm ERR!  { [Error: EACCES: permission denied, symlink '/some/path/build/jdeploy' -> '/usr/lib/node_modules/hello-world']                                  
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, symlink \'/some/path/build/jdeploy\' -> \'/usr/lib/node_modules/hello-world\'',                             
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path:
npm ERR!    '/some/path/build/jdeploy',
npm ERR!   dest: '/usr/lib/node_modules/hello-world' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

This happens, because publish task is also installing packages: https://github.com/shannah/jdeploy/blob/master/src/ca/weblite/jdeploy/JDeploy.java#L1084

sudo for install is default behavior, atleast for Arch Linux or for security reasons. I am not able install anything globally through npm without it.

I am wondering, what is reason to have npm link before publishing?

Possible workaround is to give some random node prefix like:

NPM_CONFIG_PREFIX=~/.npm-global jdeploy publish
neworld added a commit to neworld/gradle-jdeploy-plugin that referenced this issue Oct 21, 2018
jdeploy program install package globaly (npm link) before publishing. Issue described is here: shannah/jdeploy#6
@neworld
Copy link
Contributor Author

neworld commented Oct 21, 2018

Created a fix #7. Would be nice to fix this in one or another way. Until then, I will use hacky workaround: neworld/gradle-jdeploy-plugin@ebed080

@shannah
Copy link
Owner

shannah commented Oct 23, 2018

I merged your pull request. Do you still need to use a "hacky workaround" with that pull request merged, or does that solve it for you?

@neworld
Copy link
Contributor Author

neworld commented Oct 23, 2018

I didn't tested, but it should be enough. Thanks!

@shannah shannah closed this as completed Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants