Closed winner106 closed 2 years ago
Can you try blitz install
(without providing a name of a recipe) and see if there are any options? It should print available recipes
thanks for your reply. but failed again. Is this a common problem, or is it just my case?
E:\blitzjs\blitz01>blitz install
? Select a recipe to install ...
base-web
bulma
bumbag-ui
> chakra-ui
emotion
gh-action-yarn-mariadb
gh-action-yarn-postgres
ghost
graphql-apollo-server
logrocket
material-ui
passenger
quirrel
reflexjs
render
secureheaders
stitches
styled-components
tailwind
theme-ui
vanilla-extract
√ Select a recipe to install · chakra-ui
✕ Could not find recipe "undefined"
Please provide one of the following:
1. The name of a recipe to install (e.g. "tailwind")
- Available recipes listed at https://github.com/blitz-js/blitz/tree/canary/recipes
2. The full name of a GitHub repository (e.g. "blitz-js/example-recipe"),
3. A full URL to a Github repository (e.g. "https://github.com/blitz-js/example-recipe"), or
4. A file path to a locally-written recipe.
Is this a common problem, or is it just my case?
It works for me with 0.43.0, but something definitely doesn't look right. Can you run DEBUG=blitz:* blitz i chakra-ui
and paste the logs here?
Is it possible that there is a network connection problem?
I'm using Windows 10 and can't run the command DEBUG=blitz:* blitz i chakra-ui
throw error as below:
DEBUG is not an internal or external command, nor is it a runnable program or batch file.
Is it possible that there is a network connection problem?
I thought so in the beginning, but when you run blitz install
we make a call to fetch available recipes, so if there was a network issue, it should fail earlier. In the install.ts file we parse args twice: 1) https://github.com/blitz-js/blitz/blob/canary/packages/cli/src/commands/install.ts#L245, and 2) https://github.com/blitz-js/blitz/blob/canary/packages/cli/src/commands/install.ts#L251. That's probably not the cause of this issue (because it works for others), but we should remove line 245 anyway.
Could you try a different terminal if possible?
Does this error persists?
Does this error persists?
Yes, errors continue to occur, even in version 0.44🤔
How can I download a recipe to my PC ? Maybe I can try to install recipe locally , But I need some guidance ,Thanks a lot
I've tested it with Node v16.13.1 in both CMD and PowerShell and it works like a charm.
@winner106 How can I download a recipe to my PC?
First, install degit (with yarn global add degit
). Then run these commands:
degit blitz-js/blitz/recipes/RECIPE_NAME .blitz/recipe-install
cd .blitz/recipe-install
yarn install
cd ../..
blitz install .blitz/recipe-install/index.ts
(change all the /
for \
when using Windows)
I've tested it with Node v16.13.1 in both CMD and PowerShell and it works like a charm.
@winner106 How can I download a recipe to my PC?
First, install degit (with
yarn global add degit
). Then run these commands:degit blitz-js/blitz/recipes/RECIPE_NAME .blitz/recipe-install cd .blitz/recipe-install yarn install cd ../.. blitz install .blitz/recipe-install/index.ts
(change all the
/
for\
when using Windows)
I tried , Error: Cannot find module 'react'
as follows:
PS C:\Users\Administrator\Documents\blitz01> blitz install "C:\Users\Administrator\Downloads\chakra-ui\index.ts"
Loaded env from C:\Users\Administrator\Documents\blitz01\.env.local
Loaded env from C:\Users\Administrator\Documents\blitz01\.env
Error: Cannot find module 'react'
Require stack:
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\ink\build\ink.js
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\ink\build\render.js
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\ink\build\index.js
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\@blitzjs\installer\dist\blitzjs-installer.cjs.dev.js
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\@blitzjs\installer\dist\blitzjs-installer.cjs.js
- C:\Users\Administrator\Downloads\chakra-ui\index.ts
- C:\Users\Administrator\Documents\blitz01\node_modules\@blitzjs\cli\lib\src\commands\install.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\plugin.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\config.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\index.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\command\lib\command.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\command\lib\index.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@blitzjs\cli\lib\src\index.js
- C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\blitz\cli\dist\blitz-cli.cjs.dev.js
- C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\blitz\cli\dist\blitz-cli.cjs.js
Code: MODULE_NOT_FOUND
PS C:\Users\Administrator\Documents\blitz01>
Could you try with tailwind?
Could you try with tailwind?
I tried tailwind
, Error: Cannot find module 'react' as follows:
PS C:\Users\Administrator\Documents\blitz01> blitz install "C:\Users\Administrator\Downloads\tailwind\index.ts"
Loaded env from C:\Users\Administrator\Documents\blitz01\.env.local
Loaded env from C:\Users\Administrator\Documents\blitz01\.env
Error: Cannot find module 'react'
Require stack:
- C:\Users\Administrator\Downloads\tailwind\node_modules\ink\build\ink.js
- C:\Users\Administrator\Downloads\tailwind\node_modules\ink\build\render.js
- C:\Users\Administrator\Downloads\tailwind\node_modules\ink\build\index.js
- C:\Users\Administrator\Downloads\tailwind\node_modules\@blitzjs\installer\dist\blitzjs-installer.cjs.dev.js
- C:\Users\Administrator\Downloads\tailwind\node_modules\@blitzjs\installer\dist\blitzjs-installer.cjs.js
- C:\Users\Administrator\Downloads\tailwind\index.ts
- C:\Users\Administrator\Documents\blitz01\node_modules\@blitzjs\cli\lib\src\commands\install.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\plugin.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\config.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\index.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\command\lib\command.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\command\lib\index.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@blitzjs\cli\lib\src\index.js
- C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\blitz\cli\dist\blitz-cli.cjs.dev.js
- C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\blitz\cli\dist\blitz-cli.cjs.js
Code: MODULE_NOT_FOUND
PS C:\Users\Administrator\Documents\blitz01>
Could you go inside the recipe folder, install React and try again? yarn install react @types/react
Could you go inside the recipe folder, install React and try again?
yarn install react @types/react
After react @types/react
installed successfully, I tried install chakra-ui, Error: Cannot find module 'next/dist/server/lib/logging'
as follows:
PS C:\Users\Administrator\Documents\blitz01> blitz install "C:\Users\Administrator\Downloads\chakra-ui\index.ts"
Loaded env from C:\Users\Administrator\Documents\blitz01\.env.local
Loaded env from C:\Users\Administrator\Documents\blitz01\.env
Error: Cannot find module 'next/dist/server/lib/logging'
Require stack:
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\@blitzjs\installer\dist\blitzjs-installer.cjs.dev.js
- C:\Users\Administrator\Downloads\chakra-ui\node_modules\@blitzjs\installer\dist\blitzjs-installer.cjs.js
- C:\Users\Administrator\Downloads\chakra-ui\index.ts
- C:\Users\Administrator\Documents\blitz01\node_modules\@blitzjs\cli\lib\src\commands\install.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\plugin.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\config.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\config\lib\index.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\command\lib\command.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@oclif\command\lib\index.js
- C:\Users\Administrator\Documents\blitz01\node_modules\@blitzjs\cli\lib\src\index.js
- C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\blitz\cli\dist\blitz-cli.cjs.dev.js
- C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\blitz\cli\dist\blitz-cli.cjs.js
Code: MODULE_NOT_FOUND
Did you clone the recipe inside your project? If you cloned it outside, please clone it inside a new .blitz
folder inside your project
Did you clone the recipe inside your project? If you cloned it outside, please clone it inside a new
.blitz
folder inside your project
Thank you for your guidance, after clone the recipe inside my project, chakra-ui finally installed successfully!
First, I copy the folder from \blitz-canary\recipes\chakra-ui
to a new blititz project.
Second, I run yarn
in the chakra-ui folder to install the dependency package
Third, run blitz install .\chakra-ui\index.ts
in the new blitz project root folder
Finally, it was successfully installed.
But I do not know why I can't install recipes through the network installation, hope to solve this problem, thank you very much for your guidance!
Hey @winner106, could you try with the latest release?
Hey @winner106, could you try with the latest release?
After testing, the problem is still there, and the error is the same as before。
PS E:\> blitz new blitz0.44.4
WARN Failed to fetch latest version of 'blitz', falling back to ''.
√ You have the latest Blitz version
√ Pick a new project's language · TypeScript
√ Pick your new app template · full
√ Install dependencies? · yarn
√ Pick a form library (you can switch to something else later if you want) · React Final Form
Hang tight while we set up your new Blitz app!
CREATE .env
CREATE .env.local
CREATE .env.test.local
CREATE .eslintrc.js
CREATE README.md
CREATE app\api\.keep
CREATE app\auth\components\LoginForm.tsx
CREATE app\auth\components\SignupForm.tsx
CREATE app\auth\mutations\changePassword.ts
CREATE app\auth\mutations\forgotPassword.test.ts
CREATE app\auth\mutations\forgotPassword.ts
CREATE app\auth\mutations\login.ts
CREATE app\auth\mutations\logout.ts
CREATE app\auth\mutations\resetPassword.test.ts
CREATE app\auth\mutations\resetPassword.ts
CREATE app\auth\mutations\signup.ts
CREATE app\auth\pages\forgot-password.tsx
CREATE app\auth\pages\login.tsx
CREATE app\auth\pages\reset-password.tsx
CREATE app\auth\pages\signup.tsx
CREATE app\auth\validations.ts
CREATE app\core\components\Form.tsx
CREATE app\core\components\LabeledTextField.tsx
CREATE app\core\hooks\useCurrentUser.ts
CREATE app\core\layouts\Layout.tsx
CREATE app\pages\404.tsx
CREATE app\pages\_app.tsx
CREATE app\pages\_document.tsx
CREATE app\pages\index.test.tsx
CREATE app\pages\index.tsx
CREATE app\users\queries\getCurrentUser.ts
CREATE babel.config.js
CREATE blitz-env.d.ts
CREATE blitz.config.ts
CREATE db\index.ts
CREATE db\migrations\.keep
CREATE db\schema.prisma
CREATE db\seeds.ts
CREATE integrations\.keep
CREATE jest.config.ts
CREATE mailers\.keep
CREATE mailers\forgotPasswordMailer.ts
CREATE package.json
CREATE public\favicon.ico
CREATE public\logo.png
CREATE test\setup.ts
CREATE test\utils.tsx
CREATE tsconfig.json
CREATE types.ts
WARN Failed to fetch latest version of '@prisma/client', falling back to '3.x'.
WARN Failed to fetch latest version of 'zod', falling back to '3.x'.
√ Retrieving the freshest of dependencies
√ Resolving packages
√ Fetching packages
√ Linking dependencies
√ Building fresh packages
√ Initializing SQLite database
√ Committing your app
Your new Blitz app is ready! Next steps:
1. cd blitz0.44.4
2. blitz dev
PS E:\> cd .\blitz0.44.4\
PS E:\blitz0.44.4> blitz install chakra-ui
Loaded env from E:\blitz0.44.4\.env.local
Loaded env from E:\blitz0.44.4\.env
ERROR Could not find recipe "chakra-ui"
Please provide one of the following:
1. The name of a recipe to install (e.g. "tailwind")
- Available recipes listed at https://github.com/blitz-js/blitz/tree/canary/recipes
2. The full name of a GitHub repository (e.g. "blitz-js/example-recipe"),
3. A full URL to a Github repository (e.g. "https://github.com/blitz-js/example-recipe"), or
4. A file path to a locally-written recipe.
PS E:\blitz0.44.4> blitz install tailwind
Loaded env from E:\blitz0.44.4\.env.local
Loaded env from E:\blitz0.44.4\.env
ERROR Could not find recipe "tailwind"
Please provide one of the following:
1. The name of a recipe to install (e.g. "tailwind")
- Available recipes listed at https://github.com/blitz-js/blitz/tree/canary/recipes
2. The full name of a GitHub repository (e.g. "blitz-js/example-recipe"),
3. A full URL to a Github repository (e.g. "https://github.com/blitz-js/example-recipe"), or
4. A file path to a locally-written recipe.
PS E:\blitz0.44.4> blitz -v
Loaded env from E:\blitz0.44.4\.env.local
Loaded env from E:\blitz0.44.4\.env
Windows 10 | win32-x64 | Node: v14.18.0
blitz: 0.44.4 (global)
blitz: 0.44.4 (local)
Package manager: yarn
System:
OS: Windows 10 10.0.19043
CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Memory: 17.83 GB / 23.87 GB
Binaries:
Node: 14.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.15 - C:\Program Files\nodejs\yarn.CMD
npm: 7.24.2 - ~\AppData\Local\Yarn\bin\npm.CMD
Watchman: Not Found
npmPackages:
@prisma/client: 3.x => 3.6.0
blitz: 0.44.4 => 0.44.4
prisma: 3.6.0 => 3.6.0
react: 18.0.0-beta-149b420f6-20211119 => 18.0.0-beta-149b420f6-20211119
react-dom: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020
typescript: ~4.5 => 4.5.4
Same issue
Default
user@user ~/s/j/g/a/blitz-try (master) > blitz install tailwind
Loaded env from /home/user/src/js/github.com/alexgoto/blitz-try/.env.local
Loaded env from /home/user/src/js/github.com/alexgoto/blitz-try/.env
ERROR Could not find recipe "tailwind"
Please provide one of the following:
1. The name of a recipe to install (e.g. "tailwind")
- Available recipes listed at https://github.com/blitz-js/blitz/tree/canary/recipes
2. The full name of a GitHub repository (e.g. "blitz-js/example-recipe"),
3. A full URL to a Github repository (e.g. "https://github.com/blitz-js/example-recipe"), or
4. A file path to a locally-written recipe.
Without providing a name of a recipe
user@user ~/s/j/g/a/blitz-try (master) > blitz install
Loaded env from /home/user/src/js/github.com/alexgoto/blitz-try/.env.local
Loaded env from /home/user/src/js/github.com/alexgoto/blitz-try/.env
✔ Select a recipe to install · tailwind
ERROR Could not find recipe "undefined"
Please provide one of the following:
1. The name of a recipe to install (e.g. "tailwind")
- Available recipes listed at https://github.com/blitz-js/blitz/tree/canary/recipes
2. The full name of a GitHub repository (e.g. "blitz-js/example-recipe"),
3. A full URL to a Github repository (e.g. "https://github.com/blitz-js/example-recipe"), or
4. A file path to a locally-written recipe.
Version
user@user ~/s/j/g/a/blitz-try (master) > blitz -v
Loaded env from /home/user/src/js/github.com/alexgoto/blitz-try/.env.local
Loaded env from /home/user/src/js/github.com/alexgoto/blitz-try/.env
Linux 5.17 | linux-x64 | Node: v16.16.0
blitz: 0.45.4 (global)
blitz: 0.45.4 (local)
Package manager: yarn
System:
OS: Linux 5.17 Kali GNU/Linux Rolling 2022.2
CPU: (24) x64 Intel(R) Xeon(R) CPU X5675 @ 3.07GHz
Memory: 38.52 GB / 47.14 GB
Shell: 3.4.1 - /usr/bin/fish
Binaries:
Node: 16.16.0 - ~/.local/share/nvm/v16.16.0/bin/node
Yarn: Not Found
npm: 8.11.0 - ~/.local/share/nvm/v16.16.0/bin/npm
Watchman: Not Found
npmPackages:
@prisma/client: 3.16.0-integration-tmp-revert-node14.1 => 3.16.0-integration-tmp-revert-node14.1
blitz: 0.45.4 => 0.45.4
prisma: 3.16.0-integration-tmp-revert-node14.1 => 3.16.0-integration-tmp-revert-node14.1
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
typescript: ~4.5 => 4.5.5
What is the problem?
blitz install recipes fail v0.43
I tried
blitz install chakra-ui
, failed also triedblitz install tailwind
, failedPaste all your error logs here:
Paste all relevant code snippets here:
What are detailed steps to reproduce this?
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response