I am trying to install npm install -g json-server on mac OS, but it is showing error. Any recommendation. What I need to change ?
Try adding 'sudo' at the beginning.
sudo npm install -g json-server
then enter admin password to begin install.
Whenever your command is not.
Use "sudo" before code.
Ex: npm install -g json-server
Use: sudo npm install -g json-server
Sudo "forces" installation or in other words, sudo is admin.
When I install pm2 on Linux like this:
npm install pm2 -g
usr/local/bin/pm2 links to $installDir/pm2/bin/pm2-runtime.
But if I install the same version of pm2 on MacOS like this:
npm install pm2 -g
~/npm/bin/pm2 links to $installDir/pm2/bin/pm2.
What happened when install the same package on different OS platform?
I get this error when I try to load using pip install mysql-connector. I tried pip install Protobuf too but no solution.
# Python architecture: 64-bit
# Python ARCH_64BIT: True
Unable to find Protobuf include directory.
I found this useful:
pip install mysql-connector==2.1.4 is obsolete. pip install mysql-connector-python is suggested.
The official package name of MySQL Connector for Python is mysql-connector-python:
pip install mysql-connector-python
And mysql-connector is a fork package, and is stopped updating, so
pip install mysql-connector
will install this obsolete version.
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
After installing node.js and sequelize.js, and running a basic test, the message "You need to install mysql package manually" is displayed.
I've tried searching the web and Stackoverflow for the cause of this message.
I have installed:
mysql server version 5.5.31-0ubuntu0.13.04.1
node v0.10.5
sequelize.js v1.6.0
You need to install the mysql npm module:
npm install mysql
The reason sequelize doesn't have the mysql module as its own dependency is because it can be used with other databases such as postgres or sqlite.
Install mysql globally:
npm install -g mysql
For 2017+ users who are using mysql2, the mysql requirement was part of Sequelize v3.
Install v4 of Sequelize (ie. npm i sequelize#4.23.0 --save) and it will work properly with mysql2.
For more info, see this issue in the github repo.
// Using NPM
$ npm install --save sequelize
# And one of the following:
$ npm install --save pg pg-hstore
$ npm install --save mysql2
$ npm install --save sqlite3
$ npm install --save tedious // MSSQL
I had tried 'npm install mysql' as it is a few times (OCD maybe), but it didn't do the trick. What actually made a difference was the answer by Svagis above:
npm install -g mysql
Now I get an access denied error, which is more of a relief because it means progress.
As a good practice, it is suggested to keep these library local to the project, so that it can be packaged and installed in other machines by npm.
i try to install package mysql and mysql2. It works!
npm install mysql2 --save
You need to install the mysql npm module.
npm install --save mysql2
I had the same issue I tried following all the steps above.
Nothing worked. Finally, found that the sequelize-cli I installed not global so it was not able to find the mysql2 module.
So I ran the following commands.
npm uninstall sequelize-cli
npm install sequelize-cli -g --force // --force removed the previous bin files
And finally, it worked :)