If I do a temporary patch with as any on sequelize.ts -> https://github.com/feathers-plus/cli/issues/26 , the node server is "near launched" BUT there is a issue with SQL.
Is this linked to Typescript version ? feathers-sequelize or mysql 2 and MySQL 8 ? I've tried to find answers in vain...
Steps to reproduce
First, start the MySQL/PHPMYADMIN container with docker-compose. This is my docker-compose.yml :
* Do the "Get started" to "generate service", you have the 3 services created with `feathers-generate g all`
* Patch the sequelize.ts with ` let result = oldSetup.apply(this, args as any);`
* Launch with `npm run dev`
Expected behavior
Just want to start the Feathers app for the moment...
Actual behavior
Throw an error after npm run dev command :
benoit@PC-SD-01:~/projects/test_fia$ npm run dev
> test-fia@0.0.0 dev /home/benoit/projects/test_fia
> nodemon src/index.ts
[nodemon] 1.18.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: tsconfig.json tslint.json src/**/*.ts
[nodemon] starting `ts-node --files --typeCheck src/index.ts`
info: Feathers application started on http://localhost:3030
error: Unhandled Rejection at: Promise {"_bitField":18087936,"_fulfillmentHandler0":{"name":"SequelizeDatabaseError","parent":{"code":"ER_PARSE_ERROR","errno":1064,"sqlState":"42000","sqlMessage":"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PR' at line 1","sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"},"original":{"code":"ER_PARSE_ERROR","errno":1064,"sqlState":"42000","sqlMessage":"You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near 'JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PR' at line 1","sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"},"sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`))ENGINE=InnoDB;"},"_trace":{"_promisesCreated":0,"_length":1},"meta":[{"isFulfilled":false,"isRejected":true,"rejectionReason":{"name":"SequelizeDatabaseError","parent":{"code":"ER_PARSE_ERROR","errno":1064,"sqlState":"42000","sqlMessage":"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PR' at line 1","sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"},"original":{"code":"ER_PARSE_ERROR","errno":1064,"sqlState":"42000","sqlMessage":"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PR' at line 1","sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"},"sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"}},{"name":"SequelizeDatabaseError","parent":{"code":"ER_PARSE_ERROR","errno":1064,"sqlState":"42000","sqlMessage":"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PR' at line 1","sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARYKEY (`id`)) ENGINE=InnoDB;"},"original":{"code":"ER_PARSE_ERROR","errno":1064,"sqlState":"42000","sqlMessage":"You have an error in your SQL syntax; check the manual that corresponds to your MySQLserver version for the right syntax to use near 'JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PR' at line 1","sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"},"sql":"CREATE TABLE IF NOT EXISTS `teams` (`id` INTEGER auto_increment , `name` TEXT NOT NULL, `members` JSONB NOT NULL, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;"}]}
Hello,
If I do a temporary patch with
as any
on sequelize.ts -> https://github.com/feathers-plus/cli/issues/26 , the node server is "near launched" BUT there is a issue with SQL. Is this linked to Typescript version ? feathers-sequelize or mysql 2 and MySQL 8 ? I've tried to find answers in vain...Steps to reproduce
services: db: image: mysql:8.0.3 container_name: dev_mysql_8 environment:
as any
on sequelize.ts -> https://github.com/feathers-plus/cli/issues/26Steps to reproduce
Expected behavior
Tell us what should happen
Actual behavior
Tell us what happens instead
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
NodeJS version:
Operating System:
Browser Version:
React Native Version:
Module Loader:
"3306:3306"
phpmyadmin: image: phpmyadmin/phpmyadmin:4.8.5 container_name: dev_phpmybitch ports:
Expected behavior
Just want to start the Feathers app for the moment...
Actual behavior
Throw an error after
npm run dev
command :System configuration
Module versions :
Node version: 10.15.0
NPM Version: 6.4.1
Feathers-Plus Version: 0.7.75
MySQL Version: 8.0.3 (as you can see in docker-compose.yml)
Operating System: Ubuntu 18.04.1 LTS