blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Blitz CLI - `new` command doesn't work and isn't listed in help #229

Closed cbejensen closed 3 years ago

cbejensen commented 3 years ago

What is the problem?

I have Blitz 0.41.0 installed globally. When I run blitz new myApp I get an error saying it cannot find the logging module. Additionally, when I run blitz -h, the new command is not listed.

Paste all your error logs here:

(node:98933) [MODULE_NOT_FOUND] Error Plugin: @blitzjs/cli: Cannot find module 'next/dist/server/lib/logging'
Require stack:
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/blitzjs-generator.cjs.dev.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/blitzjs-generator.cjs.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/commands/generate.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/plugin.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/config.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/index.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/command/lib/command.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/command/lib/index.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/index.js
- /opt/homebrew/lib/node_modules/blitz/cli/dist/blitz-cli.cjs.dev.js
- /opt/homebrew/lib/node_modules/blitz/cli/dist/blitz-cli.cjs.js
module: @oclif/config@1.17.0
task: toCached
plugin: @blitzjs/cli
root: /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli
See more details with DEBUG=*
(node:98933) [MODULE_NOT_FOUND] Error Plugin: @blitzjs/cli: Cannot find module 'next/dist/server/lib/logging'
Require stack:
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/blitzjs-generator.cjs.dev.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/blitzjs-generator.cjs.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/commands/new.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/plugin.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/config.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/index.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/command/lib/command.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/command/lib/index.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/index.js
- /opt/homebrew/lib/node_modules/blitz/cli/dist/blitz-cli.cjs.dev.js
- /opt/homebrew/lib/node_modules/blitz/cli/dist/blitz-cli.cjs.js
module: @oclif/config@1.17.0
task: toCached
plugin: @blitzjs/cli
root: /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli
See more details with DEBUG=*
(node:98933) [MODULE_NOT_FOUND] Error Plugin: @blitzjs/cli: Cannot find module 'next/dist/server/lib/logging'
Require stack:
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/commands/routes.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/plugin.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/config.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/config/lib/index.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/command/lib/command.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@oclif/command/lib/index.js
- /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/index.js
- /opt/homebrew/lib/node_modules/blitz/cli/dist/blitz-cli.cjs.dev.js
- /opt/homebrew/lib/node_modules/blitz/cli/dist/blitz-cli.cjs.js
module: @oclif/config@1.17.0
task: toCached
plugin: @blitzjs/cli
root: /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/cli
See more details with DEBUG=*
 ›   Warning: new is not a blitz command.
Did you mean dev? [y/n]: 

Paste all relevant code snippets here:

N/A

What are detailed steps to reproduce this?

  1. npm i -g blitz
  2. blitz new myApp

Run blitz -v and paste the output here:

macOS Big Sur | darwin-arm64 | Node: v15.12.0

blitz: 0.41.0 (global)

  Package manager: npm 
  System:
    OS: macOS 11.4
    CPU: (8) arm64 Apple M1
    Memory: 205.66 MB / 16.00 GB
    Shell: 3.2.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 15.12.0 - /opt/homebrew/bin/node
    Yarn: 1.22.10 - /opt/homebrew/bin/yarn
    npm: 7.6.3 - /opt/homebrew/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: Not Found
    blitz: Not Found
    prisma: Not Found
    react: Not Found
    react-dom: Not Found
    typescript: Not Found

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

No response

piotrski commented 3 years ago

It seams to be the same issue as blitz-js/legacy-framework#23

beerose commented 3 years ago

Looks like it. We initially thought that it's windows related. I'll close this issue in favour of blitz-js/legacy-framework#23, and rename the previous one.