blitz-js / legacy-framework

MIT License
2 stars 2 forks source link

cannot install or run npx blitz commands - "route is not a function" error. #3

Open laurencefass opened 2 years ago

laurencefass commented 2 years ago

What is the problem?

When I try to install blitz I see an error.

bash-5.1# npx --yes blitz -v TypeError: route is not a function at /root/.npm/_npx/f8d2cc529b1ae519/node_modules/color-convert/index.js:67:15 at Array.forEach () at Object. (/root/.npm/_npx/f8d2cc529b1ae519/node_modules/color-convert/index.js:61:8) at Module._compile (/root/.npm/_npx/f8d2cc529b1ae519/node_modules/@blitzjs/cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Module._load (node:internal/modules/cjs/loader:822:12) at LazyLoader.loadModule (/root/.npm/_npx/f8d2cc529b1ae519/node_modules/@blitzjs/cli/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:149:21) at Function._load (/root/.npm/_npx/f8d2cc529b1ae519/node_modules/@blitzjs/cli/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:125:29) at Module.require (node:internal/modules/cjs/loader:1005:19)

Paste all your error logs here:

see above

Paste all relevant code snippets here:

no code just command line:

npx --yes blitz -v

What are detailed steps to reproduce this?

  1. see above.

Run blitz -v and paste the output here:

see above

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

No response

laurencefass commented 2 years ago

this not a fix but

npx --yes blitz@latest [...command]

works fine, so Im going with that.

for clarity

npx blitz [..command]

is the cause of this issue.

beerose commented 2 years ago

Did it happen with the alpha blitz?

laurencefass commented 2 years ago

I dont know I didnt have control of the version installed using this command.

all I can say with certainty is blitz@l;atest worked which installed (from package.json)

  "dependencies": {
    "@hookform/resolvers": "2.8.8",
    "@prisma/client": "3.13.0",
    "blitz": "0.45.4",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-hook-form": "7.30.0",
    "sass": "1.51.0",
    "zod": "3.15.1"
  },

I didnt select any of those on install.