V
V
Vladimir2019-11-14 03:30:04
Node.js
Vladimir, 2019-11-14 03:30:04

Why do I get identical errors when changing the script as before the changes?

Good night. Please help.
I cleared the cache in the browser, I tried to clear the npm cache and got this error:

>npm cache clean
npm ERR! As of [email protected], the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\History\AppData\Roaming\npm-cache\_logs\2019-11-14T00_24_27_540Z-debug.log

I changed the file in every possible way, the code commented 0 reactions .. What is the reason, please tell me.
Here is my error:

{ Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0)' at line 1
at Query.Sequence._packetToError (C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol \sequences\Sequence.js:47:14)
at Query.ErrorPacket (C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol\sequences\Query.js:77:18)
at Protocol._parsePacket ( C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol \Parser.js:433:10)
at Parser.write (C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket. (C:\Users\History\Desktop\session\node_modules\mysql\lib\Connection.js:91:28)
at Socket. (C:\Users\History\Desktop\session\node_modules\mysql\lib\Connection.js:525:10)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
--------------------
at Protocol._enqueue (C:\Users\History\Desktop\session\node_modules\mysql\lib\protocol\Protocol.js:144: 48)
at Connection.query (C:\Users\History\Desktop\session\node_modules\mysql\lib\Connection.js:201:25)
at C:\Users\History\Desktop\session\app.js:97: 17
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage:
'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'\'0)\' at line 1',
sqlState: '42000',
index: 0,
sql:
'INSERT INTO users (firstname,email ,password,role) VALUES(\'dsfsd\',\'[email protected]\',\'$2b$10$G/oPJekdPEJKMy0m8HztTOJyJO0YsDh/0id8RLIDnk6zarPR.qvz.\',\'0)' }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shohruh Shaimardonov, 2019-11-14
@HistoryART

You have different errors!
Everything that is written with npm ERR is solved through npm purge, look for answers here . And the error with ER_PARSE_ERROR is already associated with your request. in mariaDB. I think you need to rewrite
on this

INSERT INTO users (firstname,email,password,role) VALUES('dsfsd', '[email protected]', '$2b$10$G/oPJekdPEJKMy0m8HztTOJyJO0YsDh/0id8RLIDnk6zarPR.qvz.', '0')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question