ocastillo / nodejs-mysql-boilerplate

Very basic nodejs/express setup with mysql authentication.
MIT License
64 stars 18 forks source link

All broken - server won't start #2

Open AndrewRayCode opened 9 years ago

AndrewRayCode commented 9 years ago

You should pin module versions in package.json

node server.js

connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
Initializing Bookshelf with a config object is deprecated, please pass an initialized knex.js instance.

module.js:340
    throw err;
        ^
Error: Cannot find module 'knex'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Function.Bookshelf.initialize (/var/www/auth/node_modules/bookshelf/bookshelf.js:41:12)
    at module.exports (/var/www/auth/util/bookshelf.js:3:37)
    at Object.<anonymous> (/var/www/auth/server.js:31:28)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

auth@wendy-davis:/var/www/auth$ node start

module.js:340
    throw err;
        ^
Error: Cannot find module '/www/boilerplate/start'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
changhwa commented 9 years ago
npm install knex 
afern247 commented 5 years ago

With the above it works, but it gives me an error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Anyone having it?

EDIT: The problem is MySQL 8.0 uses a new default authentication plugin - caching_sha2_password - whereas MySQL 5.7 used a different one - mysql_native_password. Currently, the community Node.js drivers for MySQL don't support compatible client-side authentication mechanisms for the new server plugin.

If besides that, it runs fine, you can close the issue bro. Thanks