Require introduces a problem. There is an error in var mysql = require ('mysql) in js. Ask for advice.

problem description: there is an existing js project. Require ("mysql") works normally in the server written by node. Why does using require (" mysql") in your new js throw a require is not define error

expectation: want to use node to encapsulate mysql add, delete, modify and query statements, and call

in any js.

ask for advice

Dec.16,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4287c-2c618.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4287c-2c618.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?