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

[Powershell] "UI Framework is required" despite defined UI selection #414

Closed
Spown opened this issue Oct 27, 2024 · 3 comments
Closed

[Powershell] "UI Framework is required" despite defined UI selection #414

Spown opened this issue Oct 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working windows

Comments

@Spown
Copy link

Spown commented Oct 27, 2024

> npm create bati -- --vue --tailwindcss --authjs --ts-rest --express --prisma --google-analytics --eslint --sentry

yields:

> npx
> create-bati

⚠ A UI Framework is required when using Bati. Choose one of --react, --vue, or --solid
npm error code 5
npm error path XXX
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c create-bati
npm error A complete log of this run can be found in: %USER%\AppData\Local\npm-cache\_logs\2024-10-27T22_51_53_043Z-debug-0.log

Additional context

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.9.0
2 info using node@v22.10.0
3 silly config load:file:%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\npmrc
4 silly config load:file:XXX\.npmrc
5 silly config load:file:%USER%\.npmrc
6 silly config load:file:C:\Program Files\nodejs\etc\npmrc
7 verbose title npm create bati
8 verbose argv "create" "bati" "--vue" "--tailwindcss" "--authjs" "--ts-rest" "--express" "--prisma" "--google-analytics" "--eslint" "--sentry"
9 verbose logfile logs-max:10 dir:%USER%\AppData\Local\npm-cache\_logs\2024-10-27T22_51_53_043Z-
10 verbose logfile %USER%\AppData\Local\npm-cache\_logs\2024-10-27T22_51_53_043Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
14 http fetch GET 200 https://registry.npmjs.org/create-bati 745ms (cache revalidated)
15 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
16 verbose stack Error: command failed
16 verbose stack     at promiseSpawn (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:22:22)
16 verbose stack     at spawnWithShell (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:124:10)
16 verbose stack     at promiseSpawn (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12)
16 verbose stack     at runScriptPkg (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:77:13)
16 verbose stack     at runScript (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:12)
16 verbose stack     at run (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\libnpmexec\lib\run-script.js:48:10)
16 verbose stack     at async exec (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\node_modules\libnpmexec\lib\index.js:298:10)
16 verbose stack     at async Init.execCreate (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\lib\commands\init.js:135:5)
16 verbose stack     at async Init.exec (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\lib\commands\init.js:44:14)
16 verbose stack     at async Npm.exec (%USER%\AppData\Roaming\nvm\v22.10.0\node_modules\npm\lib\npm.js:207:9)
17 error code 5
18 error path XXX
19 error command failed
20 error command C:\Windows\system32\cmd.exe /d /s /c create-bati
21 verbose cwd XXX
22 verbose os Windows_NT 10.0.22631
23 verbose node v22.10.0
24 verbose npm  v10.9.0
25 verbose exit 5
26 verbose code 5
27 error A complete log of this run can be found in: %USER%\AppData\Local\npm-cache\_logs\2024-10-27T22_51_53_043Z-debug-0.log

image

@Spown Spown added the bug Something isn't working label Oct 27, 2024
@magne4000
Copy link
Member

This seems to be a known bug of npm cli with powershell.
The workaround is to replace the first -- with --- like so:

npm create bati --- --vue --tailwindcss --authjs --ts-rest --express --prisma --google-analytics --eslint --sentry

@magne4000 magne4000 changed the title "UI Framework is required" despite defined UI selection [Powershell] "UI Framework is required" despite defined UI selection Oct 28, 2024
@magne4000
Copy link
Member

I'm closing the issue for now. If I see other issues regarding powershell+npm usage, I'll have to update the Web UI accordingly.

@magne4000
Copy link
Member

Nevermind, --- also works on linux, so I'll just update the UI accordingly

magne4000 added a commit that referenced this issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

2 participants