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 new does not work when selecting Javascript #4116

Closed
randomsnowflake opened this issue Apr 6, 2023 · 4 comments
Closed

blitz new does not work when selecting Javascript #4116

randomsnowflake opened this issue Apr 6, 2023 · 4 comments
Labels
Projects

Comments

@randomsnowflake
Copy link

What is the problem?

blitz new does not work when selecting Javascript

Steps to reproduce:

  • blitz new BlitzTest
  • choose Javascript
  • choose Full - includes DB and auth (Recommended)
  • pick any form library

Output:

blitz new BlitzTest
✔ Pick a new project's language › JavaScript
✔ Pick your new app template › Full - includes DB and auth (Recommended)
✔ Install dependencies? › npm
✔ Pick a form library (you can switch to something else later if you want) › React Final Form (recommended)
Hang tight while we set up your new Blitz app!
AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Trying to copy from a source that does not exist: /Users/user/Downloads/BlitzTest/_forms/finalform/Form.js
    at exports.copy (/opt/homebrew/lib/node_modules/blitz/node_modules/mem-fs-editor/lib/actions/copy.js:49:3)
    at module.exports [as move] (/opt/homebrew/lib/node_modules/blitz/node_modules/mem-fs-editor/lib/actions/move.js:4:8)
    at AppGenerator.updateForms (/opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:1750:13)
    at AppGenerator.<anonymous> (/opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:1549:14)
    at Generator.next (<anonymous>)
    at /opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:1509:61
    at new Promise (<anonymous>)
    at __async$a (/opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:1493:10)
    at AppGenerator.preCommit (/opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:1534:12)
    at AppGenerator.<anonymous> (/opt/homebrew/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:1275:18) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

Alternative failure path, choose "Minimal — no DB, no auth".

Output:

blitz new BlitzTest2
✔ Pick a new project's language › JavaScript
✔ Pick your new app template › Minimal — no DB, no auth
✔ Install dependencies? › npm
Hang tight while we set up your new Blitz app!
node:internal/fs/utils:346
    throw err;
    ^

Error: ENOENT: no such file or directory, lstat '/Users/user/Downloads/BlitzTest2/src/blitz-client.ts'
    at Object.lstatSync (node:fs:1597:3)
    at __node_internal_ (node:internal/fs/utils:820:8)
    at Object.rmdirSync (node:fs:1220:15)
    at remove (/opt/homebrew/lib/node_modules/blitz/node_modules/mem-fs-editor/lib/actions/commit.js:20:6)
    at Transform._transform (/opt/homebrew/lib/node_modules/blitz/node_modules/mem-fs-editor/lib/actions/commit.js:51:7)
    at Transform._read (/opt/homebrew/lib/node_modules/blitz/node_modules/readable-stream/lib/_stream_transform.js:166:10)
    at Transform._write (/opt/homebrew/lib/node_modules/blitz/node_modules/readable-stream/lib/_stream_transform.js:155:83)
    at doWrite (/opt/homebrew/lib/node_modules/blitz/node_modules/readable-stream/lib/_stream_writable.js:390:139)
    at writeOrBuffer (/opt/homebrew/lib/node_modules/blitz/node_modules/readable-stream/lib/_stream_writable.js:381:5)
    at Writable.write (/opt/homebrew/lib/node_modules/blitz/node_modules/readable-stream/lib/_stream_writable.js:302:11) {
  errno: -2,
  syscall: 'lstat',
  code: 'ENOENT',
  path: '/Users/user/Downloads/BlitzTest2/src/blitz-client.ts'
}

Node.js v19.8.1

blitz.new works when choosing Typescript. But then I end up with #4112

Paste all your error logs here:

see above

Paste all relevant code snippets here:

see above

What are detailed steps to reproduce this?

see above

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.25 (global)
macOS Ventura | darwin-arm64 | Node: v19.8.1


 Package manager: npm

  System:
    OS: macOS 13.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 101.67 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.8.1 - /opt/homebrew/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 9.6.4 - /opt/homebrew/bin/npm
  npmPackages:
    @blitzjs/auth: Not Found
    @blitzjs/next: Not Found
    @blitzjs/rpc: Not Found
    @prisma/client: Not Found
    blitz: Not Found
    next: 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

@randomsnowflake randomsnowflake added kind/bug Something isn't working status/triage labels Apr 6, 2023
@siddhsuresh
Copy link
Member

@randomsnowflake thanks for raising the issue. Will be taking a look at this today.

@siddhsuresh siddhsuresh added the status/ready-to-work-on This issue is up for grabs label Apr 7, 2023
@siddhsuresh siddhsuresh self-assigned this Apr 7, 2023
@blitzjs-bot blitzjs-bot added status/assigned and removed status/ready-to-work-on This issue is up for grabs labels Apr 7, 2023
@siddhsuresh siddhsuresh removed their assignment Apr 9, 2023
@siddhsuresh siddhsuresh added the status/ready-to-work-on This issue is up for grabs label Apr 9, 2023
@KentHHarris
Copy link

I think maybe my issue is related to this: #4126

@olliedean
Copy link

Any updates on this issue?

@siddhsuresh siddhsuresh removed their assignment Sep 4, 2023
@JeetMakk
Copy link

JeetMakk commented Sep 4, 2023

Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
7 participants