Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

mysql adapter template missing #62

Closed
Flippo24 opened this issue Oct 1, 2018 · 5 comments
Closed

mysql adapter template missing #62

Flippo24 opened this issue Oct 1, 2018 · 5 comments

Comments

@Flippo24
Copy link

Flippo24 commented Oct 1, 2018

When runing 'feathers-plus generate service' i got an file missing error for mysql.ejs adapter.

Using generator version 0.6.37

? What is the name of the service? users...gen service name validate. input= users
...updating service

? What is the name of the service? users
? What would you call one row in the users database? user
? What kind of service is it? Sequelize
? Place service code in which nested folder, e.g. v1/blog? (optional)
? Which path should the service be registered on? /users
? Should this be served by GraphQL? Yes
skip src\services\users\users.class.js
skip src\services\users\users.interface.js
skip src\app.interface.ts
skip src\typings.d.ts
? Which database are you connecting to? MySQL (MariaDB)
? What is the database connection string? mysql://root:@localhost:3306/feathers_graphql
skip src\typings.d.ts
events.js:183
throw er; // Unhandled 'error' event
^

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\writing\templates\src_adapters\mysql.ejs
at EditionInterface.exports.copy (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\mem-fs-editor\lib\actions\copy.js:48:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
at todos.forEach (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\lib\generator-fs.js:48:24)
at Array.forEach ()
at generatorFs (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\lib\generator-fs.js:26:9)
at connection (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\writing\index.js:848:5)
at generatorWriting (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\writing\index.js:274:7)
at ConnectionGenerator.writing (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\connection\index.js:176:5)
at Object. (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\yeoman-generator\lib\index.js:424:27)
at C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\run-async\index.js:25:25
at new Promise ()
at C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\yeoman-generator\lib\index.js:425:13)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)

@eddyystop
Copy link
Member

eddyystop commented Oct 2, 2018

Thanks for this awkward catch!

I want to let you know I've been checking all the DBs / adapters combinations.

@eddyystop
Copy link
Member

The previous commit allowed the tests to call multiple generates rather than just doing a "generate all". That broke "generate connection" when called by "generate service".

All 34 adapter/Db combinations were checked for both f+/cli and f/cli. They need to be rechecked.

A test is needed for each to ensure this doesn't break again.

@eddyystop
Copy link
Member

Fix published in f+/cli v0.7.39 which runs generator v0.6.38 .

@Flippo24 please confirm it resolves your issue. Thanks.

@Flippo24
Copy link
Author

Flippo24 commented Oct 3, 2018

Now it's working as expected.
Thanks for your work.

@eddyystop
Copy link
Member

26 tests were added to cover the adapter/database combinations f+/cli handles.

Published in f+/cli v0.7.40 which runs generator v0.6.39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants