blitz-js / blitz-js/legacy-framework
Vercel boilerplate type error resulting in broken build
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### What is the problem?
Tried creating a project through vercel's GUI using Blitz template and deploying it resulted in compile time type error
### Paste all your error logs here:
```
09:53:34.254 Cloning github.com/JonasBa/.... (Branch: master, Commit: c3e825a)
09:53:34.972 Cloning completed in 718ms
09:53:34.974 Analyzing source code...
09:53:35.420 Installing build runtime...
09:53:37.435 Build runtime installed: 2015.550ms
09:53:39.136 Looking up build cache...
09:53:39.211 Build cache not found
09:53:40.028 Installing dependencies...
09:53:40.435 yarn install v1.22.10
09:53:40.467 info No lockfile found.
09:53:40.472 [1/4] Resolving packages...
09:53:43.023 warning blitz > eslint-config-blitz > babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
09:53:44.447 warning blitz > jest-environment-jsdom-fourteen > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
09:53:44.451 warning blitz > jest-environment-jsdom-fourteen > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
09:53:45.126 warning blitz > jest-environment-jsdom-fourteen > @jest/environment > @jest/transform > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
09:53:45.470 warning blitz > jest-environment-jsdom-fourteen > jsdom > request > har-validator@5.1.5: this library is no longer supported
09:53:45.551 warning blitz > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
09:53:45.551 warning blitz > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
09:53:45.873 warning blitz > @blitzjs/installer > jscodeshift > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
09:53:45.875 warning blitz > @blitzjs/installer > jscodeshift > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
09:53:46.628 warning babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
09:53:47.177 [2/4] Fetching packages...
09:54:06.482 info fsevents@2.3.2: The platform "linux" is incompatible with this module.
09:54:06.483 info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
09:54:06.483 info fsevents@1.2.13: The platform "linux" is incompatible with this module.
09:54:06.483 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
09:54:06.488 [3/4] Linking dependencies...
09:54:06.490 warning "blitz > @testing-library/react-hooks@4.0.1" has incorrect peer dependency "react@>=16.9.0".
09:54:06.491 warning "blitz > react-test-renderer@17.0.1" has incorrect peer dependency "react@17.0.1".
09:54:06.491 warning "blitz > @blitzjs/babel-preset > babel-plugin-superjson-next@0.2.2" has unmet peer dependency "next@>=9.0.0".
09:54:06.491 warning "blitz > @blitzjs/babel-preset > babel-plugin-superjson-next@0.2.2" has unmet peer dependency "superjson@1.x".
09:54:06.491 warning "blitz > @blitzjs/installer > jscodeshift@0.11.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
09:54:06.492 warning "blitz > @blitzjs/installer > ink@3.0.8" has incorrect peer dependency "react@>=16.8.0".
09:54:06.492 warning "blitz > @blitzjs/installer > ink-spinner@4.0.1" has incorrect peer dependency "react@^16.8.2".
09:54:06.492 warning "blitz > @blitzjs/core > null-loader@4.0.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
09:54:06.492 warning "blitz > @blitzjs/core > react-query@2.5.12" has incorrect peer dependency "react@^16.8.0".
09:54:06.492 warning "blitz > @blitzjs/core > next@10.0.9" has incorrect peer dependency "react@^16.6.0 || ^17".
09:54:06.492 warning "blitz > @blitzjs/core > next@10.0.9" has incorrect peer dependency "react-dom@^16.6.0 || ^17".
09:54:06.493 warning "blitz > react-test-renderer > react-shallow-renderer@16.14.1" has incorrect peer dependency "react@^16.0.0 || ^17.0.0".
09:54:06.493 warning "blitz > eslint-config-blitz > eslint-config-react-app@6.0.0" has incorrect peer dependency "eslint@^7.5.0".
09:54:06.494 warning "blitz > eslint-config-blitz > eslint-plugin-flowtype@5.2.2" has incorrect peer dependency "eslint@^7.1.0".
09:54:06.495 warning "blitz > @blitzjs/installer > ink > react-reconciler@0.24.0" has incorrect peer dependency "react@^16.0.0".
09:54:06.495 warning "blitz > @blitzjs/core > next > @next/react-dev-overlay@10.0.9" has incorrect peer dependency "react@^16.9.0 || ^17".
09:54:06.495 warning "blitz > @blitzjs/core > next > @next/react-dev-overlay@10.0.9" has incorrect peer dependency "react-dom@^16.9.0 || ^17".
09:54:06.496 warning "blitz > @blitzjs/core > next > styled-jsx@3.3.2" has incorrect peer dependency "react@15.x.x || 16.x.x || 17.x.x".
09:54:06.496 warning "blitz > @blitzjs/core > next > use-subscription@1.5.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
09:54:06.498 warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "eslint-plugin-react-hooks@1.x || 2.x".
09:54:19.681 [4/4] Building fresh packages...
09:54:26.408 success Saved lockfile.
09:54:26.411 $ prisma generate || true
09:54:26.834 prisma:warn @prisma/cli has been renamed to prisma.
09:54:26.834 Please uninstall @prisma/cli: yarn remove @prisma/cli
09:54:26.835 And install prisma: yarn add --dev prisma
09:54:27.891 Error: Could not find a schema.prisma file that is required for this command.
09:54:27.891 You can either provide it with --schema, set it as `prisma.schema` in your package.json or put it into the default location ./prisma/schema.prisma https://pris.ly/d/prisma-schema-location
09:54:27.899 Done in 47.47s.
09:54:27.955 Detected Next.js version: 10.0.9
09:54:27.959 Running "yarn run build"
09:54:28.305 yarn run v1.22.10
09:54:28.339 $ blitz build
09:54:28.480 You are using beta software - if you have any problems, please open an issue here:
09:54:28.481 https://github.com/blitz-js/blitz/issues/new/choose
09:54:29.717 - Compiling
09:54:33.666 ✔ Compiled
09:54:34.806 [33mwarn[39m - [1mYou have enabled experimental feature(s).[22m
09:54:34.807 [33mwarn[39m - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.
09:54:34.807 [36minfo[39m - Creating an optimized production build...
09:54:34.821 [35m[1mAttention[22m[39m: Next.js now collects completely anonymous telemetry regarding usage.
09:54:34.821 This information is used to shape Next.js' roadmap and prioritize features.
09:54:34.822 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
09:54:34.822 [36mhttps://nextjs.org/telemetry[39m
09:54:38.086 [31mFailed to compile.[39m
09:54:38.086 [31m[39m
09:54:38.086 [36m../../node_modules/@blitzjs/core/dist/declarations/src/server/auth/sessions.d.ts[39m:[33m8[39m:[33m28[39m
09:54:38.086 [31m[1mType error[22m[39m: ',' expected.
09:54:38.086 [0m [90m 6 | [39m ({ ctx[33m,[39m args }[33m:[39m {[0m
09:54:38.086 [0m [90m 7 | [39m ctx[33m:[39m any[33m;[39m[0m
09:54:38.086 [0m[31m[1m>[22m[39m[90m 8 | [39m args[33m:[39m [roleOrRoles[33m?[39m[33m:[39m [33mRoleType[39m [33m|[39m [33mRoleType[39m[]][33m;[39m[0m
09:54:38.087 [0m [90m | [39m [31m[1m^[22m[39m[0m
09:54:38.087 [0m [90m 9 | [39m })[33m:[39m boolean[33m;[39m[0m
09:54:38.087 [0m [90m 10 | [39m}[0m
09:54:38.087 [0m [90m 11 | [39m[36mexport[39m declare [36mconst[39m simpleRolesIsAuthorized[33m:[39m [33mSimpleRolesIsAuthorized[39m[33m;[39m[0m
09:54:38.145 error Command failed with exit code 1.
09:54:38.145 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
09:54:38.161 Error: Command "yarn run build" exited with 1
09:54:40.902 Done with "package.json"
```
Looks like highlighting breaks stack trace formatting on Github - here is a screenshot of the trace

### Paste all relevant code snippets here:
None
### What are detailed steps to reproduce this?
1. Create new vercel project from blitz template
2. Try deploying the projecct
### Run `blitz -v` and paste the output here:
macOS Big Sur | darwin-x64 | Node: v12.18.2
blitz: 0.33.0 (global)
blitz: 0.33.0 (local)
Package manager: yarn
System:
OS: macOS 11.3
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 683.97 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.6 - ~/.nvm/versions/node/v12.18.2/bin/npm
Watchman: Not Found
npmPackages:
@prisma/client: ~2.17 => 2.17.0
blitz: 0.33.0 => 0.33.0
prisma: ~2.17 => 2.17.0
react: 0.0.0-experimental-3310209d0 => 0.0.0-experimental-3310209d0
react-dom: 0.0.0-experimental-3310209d0 => 0.0.0-experimental-3310209d0
typescript: ~4.1 => 4.1.5
Contributor guide
Assessment
This issue has not been assessed yet.