blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js

Home Page:https://Blitzjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When Using `npx`, Blitz Incorrectly References `npm`

aarvinr opened this issue · comments

What is the problem?

If you don't install Blitz as a global dependency, and instead use npx blitz, the correct run command is npx blitz dev. However, after setup (using npx blitz new), Blitz incorrectly tells you to use npm blitz dev to run the app.

Paste all your error logs here:

N/A

Paste all relevant code snippets here:

$ npx blitz new myapp
...
Your new Blitz app is ready! Next steps:
  1. cd myapp
  2. blitz prisma migrate dev (when asked, you can name the migration anything)
  3. npm blitz dev

What are detailed steps to reproduce this?

  1. Install Node.js
  2. Run npx blitz new {app_name}

Run blitz -v and paste the output here:

Blitz version: 2.0.2 (local)
Linux 5.0 | linux-x64 | Node: v18.18.0
Package manager: npm

System:
  OS: Linux 5.0 undefined
  CPU: (4) x64 Intel(R) Core(TM) 19-9880H CPU @ 2.30GHZ Memory: Bytes / Bytes
  Shell: 1.0/bin/jsh
Binaries:
  Node: 18.18. /usr/local/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 9.4.2 - /usr/local/bin/npm npm
Packages:
  @blitzjs/auth: 2.0.2 => 2.0.2
  @blitzjs/next: 2.0.2 => 2.0.2
  @blitzjs/rpc: 2.0.2 => 2.0.2
  @prisma/client: 5.4.2 => 5.4.2
  blitz: 2.0.2 => 2.0.2
  next: 13.5.4 => 13.5.4
  prisma: 5.4.2 => 5.4.2
  react: 18.2.0 => 18.2.0
  react-dom: 18.2.0 => 18.2.0
  typescript: 4.8.4 => 4.8.4

Running on Stackblitz.

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

N/A

@aarvinr I am closing this issue, since I do not see this as unexpected behaviour. Let me know if you think this is not the case.

While running npx blitz new ..., the second question that will be asked in the onboarding is the package manager to be used for this project and blitz will uses the answer of this to display this helper.

image