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

aws-container not generate the docker containers on windows 10. #14262

Closed
1 task done
CGarces opened this issue Mar 10, 2021 · 10 comments
Closed
1 task done

aws-container not generate the docker containers on windows 10. #14262

CGarces opened this issue Mar 10, 2021 · 10 comments

Comments

@CGarces
Copy link
Contributor

CGarces commented Mar 10, 2021

Overview of the issue

I'm trying to deploy a monolith JHipster demo on AWS using AWS-containers

c:\jhipster\demo>jhipster aws-containers
..
πŸ”§πŸ› οΈ AWS configuring
√ ECR Auth token has been retrieved.
Run-async async() called outside a valid run-async context, callback will be ignored.
AWS default
Warning demo is using a cache provider, scaling will not be available. Refer to an AWS native scaling service.
    force ..\..\Users\demo\.yo-rc-global.json
identical pom.xml
identical src\main\java\com\demo\bootstrap\AwsSSMConfiguration.java
identical src\main\resources\META-INF\spring.factories
    force .yo-rc.json
identical src\main\resources\config\bootstrap-aws.yml
identical base.template.yml
identical demo.template.yml
Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve.
Γ— ".." no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Γ— The Docker image build failed. Error: Command failed: ../demo/./mvnw -ntp -Pprod verify jib:dockerBuild
".." no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

I'm using JHipster 6.10.5 on windows 10,

The output is partially on spanish, the translation is:

'..' is not recognized as an internal or external command
Looks like a environment issue caused by windows 10.

The process Is trying to execute ../demo/./mvnw -ntp -Pprod verify jib:dockerBuild that not is a valid command on windows system.

Any idea about how fix it?

Related issues

#8366 (comment)
Also looks like a windows machine, but maybe not is related with the original issue reported.

JHipster Version(s)
JHipster Version(s)
Environment and Tools

java version "11.0.10" 2021-01-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)

git version 2.30.1.windows.1

node: v14.16.0

npm: 6.14.11

yeoman: 3.1.1

Docker version 20.10.5, build 55c4c88

docker-compose version 1.28.5, build c4eb3a1f

Browsers and Operating System

Windows 10

  • Checking this box is mandatory (this is just to show you read everything)
@SudharakaP
Copy link
Member

SudharakaP commented Mar 10, 2021

@CGarces : Unfortunately, testing on windows is hard; I personally don't have a windows machine anymore to test and I've only tested this on Linux based machines. So although this is potentially a bug, I would say the chances are we won't be able to fix this. On the other hand you can try using the WSL (Windows subsystem for Linux). πŸ™‚

@SudharakaP
Copy link
Member

@CGarces : Also, please feel free to reopen the issue and submit a PR if you could.

@CGarces
Copy link
Contributor Author

CGarces commented Mar 10, 2021

I also think that WSL2 is a better way to go, but I need to fix one weird nvmw & npm issue.
https://stackoverflow.com/questions/66565375/npm-bin-npm-cli-js-not-found-on-wsl2-ubuntu
I have take a look at the code but I think that right now I can't fix the issue by myself.

@gmarziou
Copy link
Contributor

gmarziou commented Mar 10, 2021

Are you running this in Powershell or Command Prompt? Sometimes it makes a difference

@mshima
Copy link
Member

mshima commented Mar 10, 2021

@CGarces about the stackoverflow problem, you seems to have a broken node directory.
Remove the node directory.
For more info about this node directory see #13826 (comment)

@vishal423
Copy link
Contributor

I also think that WSL2 is a better way to go, but I need to fix one weird nvmw & npm issue.
https://stackoverflow.com/questions/66565375/npm-bin-npm-cli-js-not-found-on-wsl2-ubuntu
I have take a look at the code but I think that right now I can't fix the issue by myself.

I had a quick look into your post and it seems you are trying to mix Linux with Windows. Instead, I suggest to generate a new project on WSL2 and launch. I am using WSL2 for quite some time now without any issues. If you are concerned with IDE support, then, VSCode has much better support for remote development with WSL and IntelliJ support is in early EAP

@CGarces
Copy link
Contributor Author

CGarces commented Mar 10, 2021

Are you running this in Powershell or Command Prompt? Sometimes it makes a difference

From cmd.

@CGarces
Copy link
Contributor Author

CGarces commented Mar 10, 2021

@CGarces about the stackoverflow problem, you seems to have a broken node directory.
Remove the node directory.
For more info about this node directory see #13826 (comment)

Thanks problem fixed after rm -rf node

@pascalgrimaud pascalgrimaud added this to the v7.0.0 milestone Mar 10, 2021
@CGarces
Copy link
Contributor Author

CGarces commented Apr 13, 2021

Are you running this in Powershell or Command Prompt? Sometimes it makes a difference

Hi.
Just for reference, also fails on Powershell

βœ– The Docker image build failed. Error: Command failed: ../demo/./mvnw -ntp -Pprod verify jib:dockerBuild

@CGarces
Copy link
Contributor Author

CGarces commented Apr 13, 2021

Fixed with a really ugly workaround

https://github.com/jhipster/generator-jhipster/blob/master/generators/docker-utils.js#L114

dockerCLI.command(${opts.cwd.replace(/[/]/g, "\")}${this.dockerBuildCommand}, err => {

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

No branches or pull requests

6 participants