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

[Bug]: npm create @o3r project fails in Windows with Git Bash terminal #2692

Open
malek-benazzouz opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working priority:low

Comments

@malek-benazzouz
Copy link

Package name

core

Package version

11.5.6

Reproduction steps

In Windows, open a Git Bash window and run command npm create @o3r project.

Context:

  • git version 2.44.0.windows.1
  • git bash executable used: C:\Users\mbenazzouz\AppData\Local\Programs\Git\git-bash.exe

Current result

The creation fails with the following error:

× Confirming installation [FAILED: No terminal detected]

Full log:

$ npm create @o3r gen-project-gitbash2

> npx
> create gen-project-gitbash2



                        &BPPPB                    &                    &BPGB&
                      #Y7!!!!!J#    &#BGP5YYJJ??????????JJYY5PG#&     P7!!!!7JG
                     #!!!!!!!!!7Y5J?7!!!!!!!!!!!!!!!!!!!!!!!!!!!7?JPB5!!!!!!!!!G
                     #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~5
                      BJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?5
                       &?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7B
                      G?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!75&
                    #J!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?B
                   P7!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Y&
                 &Y!!!!!!!!!!!!7??!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!777!!!!!!!!!!!!!?#
                &?!!!!!!!!!!!!J&J&#7!!!!!!!!7?Y5PPPP55J7!!!!!!!!!5B?&P!!!!!!!!!!!!!7B
               &?!!!!!!!!!!!!!?B##P!!!!!!!!!5          &?!!!!!!!!Y&&&P!!!!!!!!!!!!!!!B
               J!!!!!!!!J7!!!!!!7!!!!!!!!!!!7YB&      BY!!!!!!!!!!777!!!!!!!?7!!!!!!!7#
              P!!!!!!!!YB!!!!!!!!!!!!!!!!!!!!!!7JY5YJ?!!!!!!!!!!!!!!!!!!!!!!YG!!!!!!!!J
             &7!!!!!!!!GG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J&7!!!!!!!!B
             B!!!!!!!!!Y&7!!!!!!!!!!!!!!!!!!77JY5PPP5YJ?7!!!!!!!!!!!!!!!!!!!BG!!!!!!!!!Y
             B!!!!!!!!!!P#Y7!!!!!!!!!!!!7JY5P5YJ????JJY5PP5J?!!!!!!!!!!!!!JBG7!!!!!!!!!J
             B!!!!!!!!!!!?PG5J?7777?JY5PPYJ7!!!!!!!!!!!!!7J5PPPYJ?77!77?5GBY!!!!!!!!!!!5
              J!!!!!!!!!!!!7JY555555YJ?7!!!!!!!!!!!!!!!!!!!!!7?JY5555555Y?!!!!!!!!!!!!!#
              #?!!!!!!!!!!!!!!!!!!!!!!!!!!!!7JYJJJ?JJJYY?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!P
               &J!!!!!!!!!!!!!!!!!!!!!!!!!!!!7?JYYYYJ??7!!!!!!!!!!!!!!!!!!!!!!!!!!!!7G
                 G?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!75&
                   BY?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7JG&
                      #PYJ?7!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!77?YPB&
  &BPPB              &Y7JYYYJ7!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7?YYYJ??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!!!!!!!!!!!!!!!!7!!!!!!!!!!!!!!!7!!!!!!!!!!!!!!!!!!!!!P
          &5!? ?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!YPY5Y!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!B
            #Y#G!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!75P5GJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?
                ?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!77!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7#
       &##BGPP557!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7Y5PPGBB#&
   &PJ?77!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7?J5#
  &?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!B
  B!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!5
  &?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!B
   #J!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7777????JJJJJJJYYYYJJJJJJJ????7777!!!!!!!!!!!!!!!!!!!!!!!!!!!7G
     GJ?7!!!!!!!!!777??JJY55PGGBB##&&&&                          &&&##BBGPP5YJ??777!!!!!!!!!!7?5#
       &#BBGGGGBB##&&                                                           &&#BBGGPPPGGB#



                               ..|''||     .     .
                              .|'    ||  .||.  .||.    ....  ... ..
                              ||      ||  ||    ||   .|...||  ||' ''
                              '|.     ||  ||    ||   ||       ||
                               ''|...|'   '|.'  '|.'  '|...' .||.

CREATE gen-project-gitbash2/angular.json (146 bytes)
CREATE gen-project-gitbash2/package.json (1041 bytes)
CREATE gen-project-gitbash2/README.md (1106 bytes)
CREATE gen-project-gitbash2/tsconfig.json (1045 bytes)
CREATE gen-project-gitbash2/.editorconfig (331 bytes)
CREATE gen-project-gitbash2/.gitignore (629 bytes)
CREATE gen-project-gitbash2/.vscode/extensions.json (134 bytes)
CREATE gen-project-gitbash2/.vscode/launch.json (490 bytes)
CREATE gen-project-gitbash2/.vscode/tasks.json (980 bytes)
- Installing packages (npm)...
√ Packages installed successfully.
warning: in the working copy of '.editorconfig', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of '.gitignore', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of '.vscode/extensions.json', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of '.vscode/launch.json', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of '.vscode/tasks.json', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'README.md', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'angular.json', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'package-lock.json', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'package.json', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'tsconfig.json', CRLF will be replaced by LF the next time Git touches it
    Successfully initialized git.

added 38 packages, removed 3 packages, changed 3 packages, and audited 528 packages in 5s

84 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
> Determining Package Manager
› Using package manager: npm
√ Determining Package Manager
> Loading package information from registry
√ Loading package information from registry
> Confirming installation
› '--skip-confirmation' can be used to bypass installation confirmation. Ensure package name is correct prior to '--skip-confirmation' option usage.
× Confirming installation [FAILED: No terminal detected]
npm error code 3
npm error path C:\git_clones
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c create gen-project-gitbash2
npm error A complete log of this run can be found in: C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-14T10_13_04_730Z-debug-0.log

Expected result

I would expect the creation to work in Windows Git bash.

Note: If I use the Git bash profile in Windows Terminal, or in an IDE terminal, it works fine. We can note that the executable file used is different:

  • Git bash window:
    C:\Users\mbenazzouz\AppData\Local\Programs\Git\git-bash.exe
  • Git bash profile in Windows Terminal or in IDE:
    C:\Users\mbenazzouz\AppData\Local\Programs\Git\bin\bash.exe

Additional comments

Content of npm log file C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-14T10_13_04_730Z-debug-0.log:

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\npmrc
4 silly config load:file:C:\git_clones\.npmrc
5 silly config load:file:C:\Users\mbenazzouz\.npmrc
6 silly config load:file:C:\Program Files\nodejs\etc\npmrc
7 verbose title npm create @o3r gen-project-gitbash2
8 verbose argv "create" "@o3r" "gen-project-gitbash2"
9 verbose logfile logs-max:10 dir:C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-14T10_13_04_730Z-
10 verbose logfile C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-14T10_13_04_730Z-debug-0.log
11 silly logfile done cleaning log files
12 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
13 http fetch GET 200 https://registry.npmjs.org/@o3r%2fcreate 1546ms (cache updated)
14 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
15 verbose stack Error: command failed
15 verbose stack     at promiseSpawn (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:22:22)
15 verbose stack     at spawnWithShell (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:124:10)
15 verbose stack     at promiseSpawn (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12)
15 verbose stack     at runScriptPkg (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:77:13)
15 verbose stack     at runScript (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:12)
15 verbose stack     at run (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\libnpmexec\lib\run-script.js:48:10)
15 verbose stack     at async exec (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\node_modules\libnpmexec\lib\index.js:293:10)
15 verbose stack     at async Init.execCreate (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\lib\commands\init.js:136:5)
15 verbose stack     at async Init.exec (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\lib\commands\init.js:44:14)
15 verbose stack     at async Npm.exec (C:\Users\mbenazzouz\AppData\Roaming\nvm\v20.17.0\node_modules\npm\lib\npm.js:207:9)
16 error code 3
17 error path C:\git_clones
18 error command failed
19 error command C:\WINDOWS\system32\cmd.exe /d /s /c create gen-project-gitbash2
20 verbose cwd C:\git_clones
21 verbose os Windows_NT 10.0.22631
22 verbose node v20.17.0
23 verbose npm  v10.8.2
24 verbose exit 3
25 verbose code 3
26 error A complete log of this run can be found in: C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-14T10_13_04_730Z-debug-0.log
@malek-benazzouz malek-benazzouz added bug Something isn't working triage labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low
Projects
None yet
Development

No branches or pull requests

2 participants