You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying out this new example from examples/with-mysql works fine locally but when I try to build it using yarn build it throws a build time error.
yarn build
yarn run v1.22.5
$ next build
Loaded env from D:\dev-stuff\next.js\examples\with-mysql\.env.local
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (5/5)
info - Finalizing page optimization
...
Screenshots
$ yarn build
yarn run v1.22.5
$ next build
Loaded env from D:\dev-stuff\next.js\examples\with-mysql\.env.local
Failed to compile.
./pages/api\get-entry.ts:10:25
Type error: Argument of type 'string | string[]' is not assignable to parameter
of type 'string'.
Type 'string[]' is not assignable to type 'string'.
8 | return res.status(400).json({ message: '`id` required' })
9 | }
> 10 | if (typeof parseInt(id) !== 'number') {
| ^
11 | return res.status(400).json({ message: '`id` must be a number' })
12 | }
13 | const results = await query(
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
examplesIssue was opened via the examples template.good first issueEasy to fix issues, good for newcomers
Bug report
Describe the bug
I was trying out this new example from
examples/with-mysql
works fine locally but when I try to build it usingyarn build
it throws a build time error.Its related to this: #19452
Link to the example: https://github.com/vercel/next.js/tree/canary/examples/with-mysql
To Reproduce
yarn build
Expected behavior
Build to succeed eg.
Screenshots
System information
The text was updated successfully, but these errors were encountered: