Closed ajoysinhaabbvie closed 4 years ago
Hi @ajoysinhaabbvie, thanks to use NHipster.. every feedback is very important. So, could you explain what version of blueprint are you using? The last release passed every integration test that covers your use case: https://github.com/jhipster/generator-jhipster-nodejs/runs/384846320
I am using : generator-jhipster-nodejs@1.0.0-beta.2 I have created nodejs microservice app from jdl file. and then run the application server. attaching the screenshots for your reference .. hope this will help ..
If i do rename application-dev.yml to application-d.yml then system is working .
Attaching jdl file for your reference Please change name from .txt to .jdl
Maybe I have understand your problem.. Can you check what is the value of the node system variable NODE_ENV? It is used in the app starting: https://github.com/jhipster/generator-jhipster-nodejs/blob/927622480140e64c12437c0f979ab8f64c1f8f69/generators/server/templates/server/src/config/config.ts.ejs#L91
So to change it you can rewrite value in your env project file
The value must be dev, prod or test.
If it is the problem, I can provide in the startup a code check if the NODE_ENV value (that is the app profile) is allowed having a related application.yml
Hi @ajoysinhaabbvie, any news???
we had the same problem so we changed:
-const yamlConfig = yaml.safeLoad(fs.readFileSync(dirname + '/application.yml', 'utf8'));
-const envYamlConfig = yaml.safeLoad(fs.readFileSync(dirname + /application-${process.env.NODE_ENV}.yml
, 'utf8'));
+const yamlConfig = yaml.safeLoad(fs.readFileSync(dirname + '/../../config/application.yml', 'utf8'));
+const envYamlConfig = yaml.safeLoad(fs.readFileSync(dirname + /../../config/application-${process.env.NODE_ENV}.yml
, 'utf8'));
It is linked to #99 that has more details.
Fix with #102 , I will release the 1.0.0-beta.3
Hi @ajoysinhaabbvie and @kosnkow , you can test the new version just published 1.0.0-beta.3. Feel free to open new issues if there are another problems. Thanks!
Describe the bug After creation of nodebased microservice using jhipster import-jdl model-name.jdl --blueprints nodejs, on start of server "npm start" application is looking for a file name application-d.yml. where as application-dev.yml
To Reproduce Steps to reproduce the behavior:
Application is giving error as below [nodemon] starting
ts-node src/main.ts
Error: ENOENT: no such file or directory, open 'D:\microservices\services\usermicroservice\server\src\config/application-d.yml'Expected behavior application should start
Note : if you change the application-dev.yml into application-d.yml, then application is starting smoothly