EACCES: permission denied, open - json

bower EACCES EACCES: permission denied, open '/home/caner/.cache/bower/packages/e5ec1b46386aa59c822f27e340f7ab5b-1.5.8.lock'
Stack trace:
Error: EACCES: permission denied, open '/home/caner/.cache/bower/packages/e5ec1b46386aa59c822f27e340f7ab5b-1.5.8.lock'
at Error (native)
Console trace:
Error
at StandardRenderer.error (/home/caner/.npm-global/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
at Logger.<anonymous> (/home/caner/.npm-global/lib/node_modules/bower/lib/bin/bower.js:110:26)
at emitOne (events.js:90:13)
at Logger.emit (events.js:182:7)
at Logger.emit (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
at /home/caner/.npm-global/lib/node_modules/bower/lib/commands/index.js:48:20
at _rejected (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:844:24)
at /home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:870:30
at Promise.when (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:1122:31)
at Promise.promise.promiseDispatch (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:788:41)
System info:
Bower version: 1.7.9
Node version: 5.12.0
OS: Linux 4.4.0-38-generic x64
i got this error when i try to install bower with
bower pdate
i tried lots of things.
bower init
chown
but did not work
i first installed npm then try to install bower.
i did most of those
https://www.google.com.tr/search?q=Error%3A+EACCES%3A+permission+denied%2C+open+%27%2F%2Fbower-github.json%27&oq=Error%3A+EACCES%3A+permission+denied%2C+open+%27%2F%2Fbower-github.json%27&aqs=chrome..69i57j69i58.3505j0j4&sourceid=chrome&ie=UTF-8
but not working.
what can be reason?
what i want to do is
npm install
npm install -g bower (no need if you have installed bower)
bower install
bower prune
bower update
npm install -g gulp (no need if you have installed gulp)
gulp install
in a project directory

Remove .cache folder first, I guess that .cache folder created with different permissions, it happens when You play with sudo and etc.
So run this:
sudo rm -rf /home/caner/.cache
and after that run Your commands again

Related

How to install pm2-logrotate

I am trying to install pm2-logrotate,
sudo pm2 install pm2-logrotate
I am getting
[PM2][Module] Installing NPM pm2-logrotate module
[PM2][Module] Calling [NPM] to install pm2-logrotate ...
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/pm2-logrotate failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
npm ERR! A complete log of this run can be found in:
npm ERR! /home/moveoadm/.npm/_logs/2022-09-11T12_58_10_842Z-debug.log
[PM2][ERROR] Installation failed via NPM, module has been restored to prev version
Looks like npm cannot resolve registry.npmjs.org, i.e. it not connected to Internet.
There are a lot of reasons, for instance, docker configuration - look at What's the cause of the error 'getaddrinfo EAI_AGAIN'?

How to uninstall angular packaged library

I have installed example-app using this command npm install --save example-app but i can not uninstall this library So how to uninstall this npm package?
Not working
npm uninstall --save example-app
Try this:
1)
npm uninstall example-ng-lib-app --save
2)
or delete node_modules directory (you might need to kill the app first).
remove the example-ng-lib-app from package.json in your root directory.
run command: npm install

gulp4 install error on windows7 64bit

this git bash run is command
npm install -g gulpjs/gulp#4.0 -g
install process output error
npm WARN optional Skipping failed optional dependency /gulp/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.1.1
install after
gulp -v
[10:53:26] CLI version 1.2.2
[10:53:26] Local version 0.0.1
build project error
gulp build_dev
[04:44:54] Unsupported gulp version 0.0.1
???
Have you tried
npm install -g gulp

gulp command line installation

I tried installing gulp via cmd on my mac but and used
nmp install gulp-cli --global
but couldn't install, instead it throws a permission denied error as show in the image below. Any suggestions?
http://i.stack.imgur.com/dO91r.png
It's all about permission problem. You can try,
sudo npm install -g gulp-cli--global --allow-root

Compoundjs fails to run with jugglingdb-mysql

Trying to test compoundjs with mysql but it fails.
My system is Debian 7 with following versions of nodejs & npm
$ node -v
v0.10.13
$ npm -v
1.3.4
Here is how I installed compoundjs
sudo npm install -g compound
sudo npm install -g jugglingdb --save
sudo npm install -g jugglingdb-mysql
compound init testapp --db mysql
cd testapp
npm install
$ node server.js
WARNING: JugglingDB adapter "mysql" is not installed,
so your models would not work, to fix run:
npm install jugglingdb-mysql
/srv/www/playground/node/testapp/node_modules/jugglingdb/lib/railway.js:55
if (!schema.adapter) throw new Error('Adapter is not defined');
^
Error: Adapter is not defined
at init (/srv/www/playground/node/testapp/node_modules/jugglingdb/lib/railway.js:55:36)
at CompoundServer.initialize (/srv/www/playground/node/testapp/node_modules/jugglingdb/index.js:31:19)
at CompoundServer.EventEmitter.emit (events.js:98:17)
at CompoundServer.initCompound (/srv/www/playground/node/testapp/node_modules/compound/lib/compound.js:123:14)
at CompoundServer.initCompoundServer [as init] (/srv/www/playground/node/testapp/node_modules/compound/lib/server/compound.js:53:29)
at /srv/www/playground/node/testapp/node_modules/compound/lib/compound.js:67:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:901:3
After getting the error above I tried
npm install jugglingdb-mysql
I still get the same error. I have tried installing jugglingdb and jugglingdb-mysql globally and locally (without -g). I keep getting the same error.
The bug is due to the jugglingdb version used in the npm deposit of jugglingdb-mysql, so the only way to fix it is to delete the directory and copy the one you use in your main project :
cd $YOUR_PROJECT_ROOT
rm -rf node_modules/jugglingdb-mysql/node_modules/jugglingdb
cp -R node_modules/jugglingdb node_modules/jugglingdb-mysql/node_modules
I haven't tries to install the adapter manually from github, maybe it works too.
The problem is reported here https://github.com/jugglingdb/mysql-adapter/issues/46