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

CLI don't work when is install locally #247

Closed
bato3 opened this issue Apr 18, 2018 · 9 comments
Closed

CLI don't work when is install locally #247

bato3 opened this issue Apr 18, 2018 · 9 comments

Comments

@bato3
Copy link

bato3 commented Apr 18, 2018

Related to: #245, #246

I have shared hosting, and I can't install packages globally. (npm)

And local version try using "my project" package.json

@sanex3339
Copy link
Member

Please, use search. Try to run npm link or npm link javascript-obfuscator

@bato3
Copy link
Author

bato3 commented Apr 18, 2018

  1. I don't have with run command, but after running it program throws error.

  2. Do you understated what is sharing hosting?

[czat@s12]:<~/test2>$ npm link javascript-obfuscator
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'\n    at Error (native)',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
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).

@sanex3339
Copy link
Member

So, run it locally with ./node_modules/javascript-obfuscator/bin/javascript-obfiscator

@bato3
Copy link
Author

bato3 commented Apr 18, 2018

Mesh...

$ pwd
/root/test3
$ npm install  --save-dev javascript-obfuscator
$ ./node_modules/javascript-obfuscator/bin/javascript-obfuscator
Error: ENOENT: no such file or directory, open '/root/test3/package.json'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.readFileSync (fs.js:510:33)
    at Object.<anonymous> (/root/test3/node_modules/pjson/pjson.js:4:19)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)

@sanex3339
Copy link
Member

Oh, this is bug. Will try to fix it in the near future.

@sanex3339 sanex3339 added the bug label Apr 18, 2018
@rafaelkapela
Copy link

rafaelkapela commented Apr 18, 2018

Same here...

@sanex3339 sanex3339 added this to the 0.17.0 milestone Apr 18, 2018
@sanex3339
Copy link
Member

sanex3339 commented Apr 19, 2018

Fix will be in this PR
#253

Now package version will added to the code through process.env.VERSION variable with help of webpack, so i removed from the code pjson package

@sanex3339
Copy link
Member

Fix in the master branch now. You can use version from master branch until release.

@sanex3339
Copy link
Member

0.17.0 version in out!

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

No branches or pull requests

3 participants