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

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

Open
laurencefass opened this issue May 9, 2022 · 3 comments

Comments

@laurencefass
Copy link

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
Copy link
Author

laurencefass commented May 9, 2022

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
Copy link
Contributor

beerose commented Jun 22, 2022

Did it happen with the alpha blitz?

@laurencefass
Copy link
Author

laurencefass commented Jun 22, 2022

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.

@dillondotzip dillondotzip transferred this issue from blitz-js/blitz Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants