Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No routes nor services are generated #53

Open
alfirin opened this issue Aug 29, 2019 · 3 comments · May be fixed by #54
Open

No routes nor services are generated #53

alfirin opened this issue Aug 29, 2019 · 3 comments · May be fixed by #54

Comments

@alfirin
Copy link

alfirin commented Aug 29, 2019

The server is properly generated saying "Done" without errors.

However no files are generated under src/api/routes and src/api/services.
Which lead to this error:

Error: Cannot find module './routes/server-settings'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Users\SESA351036\Documents\Dev\schneider\edm\test\my-api\src\api\index.js:17:29)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)


@PhearZero PhearZero linked a pull request Aug 30, 2019 that will close this issue
@IanIsFluent
Copy link

Yeah, not sure why this package exists? It doesn't seem to do anything much.

@Demonium
Copy link

Hi,
When using the generator in my code at the first time the routes and services folder are generated inside the node_modules/swagger-node-codegen folder.
at the next run they are generated in the correct folder, maybe linked ?

@natanbig
Copy link

natanbig commented May 6, 2020

Hey,
I created template for koa router. However I'm experienced the same issue like @Demonium described above. I cloned your project and add my koa template to the templates folder. Once I ran generate method js files created in templates/koa/api/routes and services folders. The aforementioned js files generated only after second run.

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

Successfully merging a pull request may close this issue.

4 participants