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

blitz CLI doesn't work in Windows #841

Closed
wKovacs64 opened this issue Apr 21, 2020 · 2 comments · Fixed by blitz-js/blitz#192
Closed

blitz CLI doesn't work in Windows #841

wKovacs64 opened this issue Apr 21, 2020 · 2 comments · Fixed by blitz-js/blitz#192

Comments

@wKovacs64
Copy link
Contributor

wKovacs64 commented Apr 21, 2020

What is the problem?

Globally installed blitz CLI doesn't work in Windows.

Steps to Reproduce:

  1. yarn global add blitz@0.5.0-canary.5
  2. blitz new my-blitz-project

Versions:

  • Blitz: 0.5.0.-canary.5
  • OS: Windows 10

Supporting Documentation

❯ blitz new my-blitz-project
debug: global-linked
debug: pkgPath: C:\Users\Justin\AppData\Local\Yarn\Data\global\node_modules\cli

internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module 'C:\Users\Justin\AppData\Local\Yarn\Data\global\node_modules\cli'
Require stack:
- C:\Users\Justin\AppData\Local\Yarn\Data\global\node_modules\blitz\dist\cli.js
- C:\Users\Justin\AppData\Local\Yarn\Data\global\node_modules\blitz\bin\blitz
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\Justin\AppData\Local\Yarn\Data\global\node_modules\blitz\dist\cli.js:46:11)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Justin\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\blitz\\dist\\cli.js',
    'C:\\Users\\Justin\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\blitz\\bin\\blitz'
  ]
}

(Note: blitz and blitz -v also yield the exact same error output, so it's not command specific.)

@wKovacs64 wKovacs64 changed the title blitz command doesn't work in Windows blitz CLI doesn't work in Windows Apr 21, 2020
@camilo86
Copy link
Contributor

Yeah, I did a clean install of blitz on windows, and I'm seeing the same issue 😥 I'm looking to see if this could maybe be a problem during the oclif release process

@flybayer
Copy link
Member

This is an issue with the cli.ts file inside the blitz package. Where global vs local usage is determined and executed.

I'll try to set up a VM and debug this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants