blitz-js / blitz-js/legacy-framework

bliz install next-ui fails with error

Open
#5 2 comments 0 reactions 0 assignees View on GitHub
kind/bug legacy-framework status/triage
Dominant language
JavaScript
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### What is the problem?

When installing `next-ui`, the script fails:

```
/Users/timfee/Sites/www/.blitz/recipe-install/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^

Error: At least one choice must be selectable
at AutoComplete.reset (/Users/timfee/Sites/www/.blitz/recipe-install/node_modules/enquirer/lib/types/array.js:38:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at AutoComplete.initialize (/Users/timfee/Sites/www/.blitz/recipe-install/node_modules/enquirer/lib/types/array.js:25:5)
at /Users/timfee/Sites/www/.blitz/recipe-install/node_modules/enquirer/lib/prompt.js:236:7
```

It *does* make changes to _app.tsx, but I'm not sure if there were more steps ahead.

### Paste all your error logs here:

```
❯ blitz install next-ui
Loaded env from /Users/timfee/Sites/www/.env.local
Loaded env from /Users/timfee/Sites/www/.env

Recipe: Next UI

This will install all necessary dependencies and configure Next UI for use.

Repo: https://github.com/blitz-js/blitz
Author: moyurusuto.mochi@gmail.com

Press ENTER to continue
```

```
✅ Installed 1 dependency

+–––––––––––––––––––––––––––––––––––––+
⎪   Import NextUIProvider component   ⎪
+–––––––––––––––––––––––––––––––––––––+
Import the Next UI provider into _app, so it is accessible in the whole app

--- app/pages/_app.tsx
+++ app/pages/_app.tsx
@@ -7,20 +7,24 @@
} from 'blitz'

import { NextUIProvider } from '@nextui-org/react'

+import { NextUIProvider } from "@nextui-org/react";
+
export default function App({ Component, pageProps }: AppProps) {
const getLayout = Component.getLayout || ((page) => page)

return (

-
- {getLayout()}
-
+
+
+ {getLayout()}
+
+

- )
+ );
}

function RootErrorFallback({ error }: ErrorFallbackProps) {
return (

The above changes will be made. Press ENTER to continue
```
```
/Users/timfee/Sites/www/.blitz/recipe-install/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^

Error: At least one choice must be selectable
at AutoComplete.reset (/Users/timfee/Sites/www/.blitz/recipe-install/node_modules/enquirer/lib/types/array.js:38:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at AutoComplete.initialize (/Users/timfee/Sites/www/.blitz/recipe-install/node_modules/enquirer/lib/types/array.js:25:5)
at /Users/timfee/Sites/www/.blitz/recipe-install/node_modules/enquirer/lib/prompt.js:236:7
```

### Paste all relevant code snippets here:

n/a

### What are detailed steps to reproduce this?

1. Create a brand new project (without anything else in it)
2. Run `blitz install next-ui`

### Run `blitz -v` and paste the output here:

```
❯ blitz -v
Loaded env from /Users/timfee/Sites/www/.env.local
Loaded env from /Users/timfee/Sites/www/.env
macOS Monterey | darwin-arm64 | Node: v16.14.2

blitz: 0.45.3 (global)
blitz: 0.45.3 (local)

Package manager: yarn
System:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Max
Memory: 29.85 GB / 64.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.14.2 - /opt/homebrew/opt/node@16/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.5.0 - /opt/homebrew/opt/node@16/bin/npm
Watchman: Not Found
npmPackages:
@prisma/client: Not Found
blitz: 0.45.3 => 0.45.3
prisma: Not Found
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
typescript: 4.6.3 => 4.6.3
```

### Please include below any other applicable logs and screenshots that show your problem:

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.