You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I developed a project by jhipster with jdl on Windows 11 platform, after generating code by jdl, the line separator mode of the files of my project will tranform from CRLF to LF which conflict against git while comparing code by Jetbrains IDEAJ.
Motivation for or Use Case
Reproduce the error
Generate app from JDL (files are generated with LF ending)
Change the line separators of the whole project from LF to CRLF in IDEAJ. Select the root folder -> click File Menu -> select File Properties -> Select Line Separators -> Select CRLF.
Now all of the files would be CRLF mode.
Rerun app generation
Compare files in Commit View. It will show difference of line separators.
This --auto-crlf option can work, I suggest if there are some descriptions for these kind of options on Jhipster Docs could be easy for developers.
Additionally, since my project is based on microservices architecture, while I executed command jhipster jdl .\store\microservice-ecommerce-store-4-apps.jdl --auto-crlf, error arose at the end, but the result is still successful. I am not sure if it need a optimization, because my ms-ecommerce-store as a regular root directory is actual without git management. And gateway and each microservice have their owe git configuration.
ERROR! An error occured while running jhipster:bootstrap#commitPrettierConfig
ERROR! ERROR! D:\workspace\ms-ecommerce-store is not inside a git repository
Error: D:\workspace\ms-ecommerce-store is not inside a git repository
at autoCrlfTransform (file:///C:/Users/flyli/AppData/Roaming/nvm/v20.17.0/node_modules/generator-jhipster/dist/generators/bootstrap/support/auto-crlf-transform.js:56:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BootstrapGenerator.commitSharedFs (file:///C:/Users/flyli/AppData/Roaming/nvm/v20.17.0/node_modules/generator-jhipster/dist/generators/bootstrap/generator.js:173:37)
at async BootstrapGenerator.commitPrettierConfig (file:///C:/Users/flyli/AppData/Roaming/nvm/v20.17.0/node_modules/generator-jhipster/dist/generators/bootstrap/generator.js:137:9)
at async BootstrapGenerator.method (file:///C:/Users/flyli/AppData/Roaming/nvm/v20.17.0/node_modules/generator-jhipster/dist/generators/bootstrap/generator.js:128:17)
at async BootstrapGenerator.executeTask (file:///C:/Users/flyli/AppData/Roaming/nvm/v20.17.0/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:258:13)
at async runLoop.add.once (file:///C:/Users/flyli/AppData/Roaming/nvm/v20.17.0/node_modules/generator-jhipster/node_modules/yeoman-environment/dist/environment-base.js:395:17)
Overview of the issue
I developed a project by jhipster with jdl on Windows 11 platform, after generating code by jdl, the line separator mode of the files of my project will tranform from CRLF to LF which conflict against git while comparing code by Jetbrains IDEAJ.
Motivation for or Use Case
Reproduce the error
Related issues
#19461
Suggest a Fix
JHipster Version(s)
8.7.3
JHipster configuration
microservice-ecommerce-store-4-apps.txt
.yo-rc.json file
Environment and Tools
openjdk version "17.0.12" 2024-07-16 LTS
OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)
git version 2.45.1.windows.1
node: v20.17.0
npm: 10.8.2
Docker version 27.1.1, build 6312585
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Browsers and Operating System
git version = git version 2.45.1.windows.1
git config core.autocrlf = true
Edition Windows 11 Pro
Version 23H2
Installed on 8/19/2024
OS build 22631.4391
Experience Windows Feature Experience Pack 1000.22700.1047.0
The text was updated successfully, but these errors were encountered: