E
E
Eugene2019-02-10 18:22:56
Node.js
Eugene, 2019-02-10 18:22:56

How to install mysql via npm?

In general, good evening, and to whom morning.
Installed on the server (Centos 7) Node.js and NPM.
Now I want mysqljs, but it doesn't work...
Tried like this:
sudo npm install mysql --save
As a result, the error is:

npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "mysql" under a package
npm ERR! also called "mysql". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR!     <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>                                                                                                          
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-10T15_14_24_776Z-debug.log

Tried cleaning package... Cleaned it up.
I start again ... And again yells, but there is already no Description / Repository, etc., etc.
I can’t even install MongoDB through yum, again some problems.
I'm thinking about using json instead of a database :D

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Shumov, 2019-02-10
@inoise

Do you seriously need to install the database through npm? Are you no longer satisfied with the standard os tools?

I
Ivan Bogachev, 2019-02-10
@sfi0zy

npm ERR! code ENOSELF

Change the "name" field in package.json to something else (not "mysql" or some other dependency package name).

S
sumrakx, 2019-02-10
@sumrakx

Clean up package-lock.json

M
McBernar, 2019-02-10
@McBernar

Install mysql normally via the package manager in the OS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question