cannot create mongo_hacker.js: Permission denied
See original GitHub issueon Debian 8, Node v8.4.0, Npm v 5.3.0
run by root…
# npm install -g mongo-hacker
> mongo-hacker@0.0.15 install /usr/lib/node_modules/mongo-hacker
> make install
cat config.js base.js hacks/color.js hacks/common.js hacks/aggregation.js hacks/old_aggregation.js hacks/uuid.js hacks/find_and_modify.js hacks/prompt.js hacks/auto_complete.js hacks/dbref.js hacks/helpers.js hacks/cmd_search.js hacks/show.js hacks/ps.js hacks/verbose.js hacks/randomise.js hacks/api.js hacks/index_paranoia.js hacks/sh_status.js hacks/count.js > mongo_hacker.js
/bin/sh: 1: cannot create mongo_hacker.js: Permission denied
Makefile:10: recipe for target 'mongo_hacker.js' failed
make: *** [mongo_hacker.js] Error 2
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! mongo-hacker@0.0.15 install: `make install`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the mongo-hacker@0.0.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-09-05T18_09_50_908Z-debug.log
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Permission denied error trying to install Mongo-Hacker?
Failed at the mongo-hacker@0.0.15 install script 'make install'. npm ... rm: /Users/stephanierichter/.mongorc.js: Permission denied make: ...
Read more >Installation permission problems · Issue #154 · TylerBrock/mongo ...
Failed at the mongo-hacker@0.0.12 install script 'make install'. npm ERR! ... cannot create mongo_hacker.js: Permission denied #176.
Read more >permission denied for mongodb container error while running ...
EDIT: Your issue is container / host permissions. This answer might help. ORIGINAL ANSWER: Will keeping MongoDb in my local as well as...
Read more >Permission denied message while running mongo command ...
Hi, I am following the Developer certificate course. From the Chapter 2, I followed the video to install mongo shell.
Read more >.mongorc.js' failed with errno:13 Permission denied
I deleted that file and I am able to use the mongo shell from pycharm. but still cannot run programs using pycharm, the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This worked for me:
sudo npm install --global --unsafe-perm mongo-hackerPost-install scripts are normally prohibited by root (for good reason); the
--unsafe-permflag allows these scripts to run.If you can, use NVM instead of installing Node directly, as NVM will let you run
npm install --globalwithoutsudo.On my Mac with NVM,
npm install --global mongo-hackerworks fine 👍