jhipster-lite
jhipster-lite copied to clipboard
Changing the format / indent does not seem to work
I am using the UI provided by the Docker container. I only get indent size of two spaces. The log shows:
t.j.l.p.i.s.TraceProjectFormatter : No npm installed, can't format project
I guess you are clicking the format button somewhere in the process? We need to update this button activation to be bound to prettier application
Yes I clicked "Apply selected" only then the "Format" button became active and I clicked it. Also I noticed changing the line ending has no effect - I always get "lf".
Did you select prettier module?
I didn't but I checked now and nothing changed.
Just made some test, forgot the activation updates were already done (here https://github.com/jhipster/jhipster-lite/pull/3545)...
Ok, so looks like we need to add npm in the docker image :D. cc @pascalgrimaud
I used the Docker container. And I see that the TraceProjectFormatter is not trying too hard to even check for NPM :)
Yep, this the instance used when no npm installation can be found :D. We need to add npm in the published docker image :)
Indeed, it would be a good enhancement
@pascalgrimaud where is the root image used to publish on docker hub?
@DamnClin : it comes from https://github.com/jhipster/jhipster-lite/blob/main/Dockerfile
Ok, adding npm should be pretty straightforward so, do you consider it a good first issue?
I don't think it's a good first issue :-D Not so easy to find the good solution
Ok, my bad, I though this just needs something like this:
ARG NVM_VERSION=v0.39.2
ARG NODE_VERSION=v18.12.1
ENV NVM_DIR=/root/.nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm install-latest-npm \
&& nvm use default
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
Maybe your solution can work, but it needs to be tested
Of course, just dropped some stuff here