-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
ReferenceError: fetchData is not defined #33088
Comments
balazsorban44
added
area: SWC Minify
and removed
bug
Issue was opened via the bug report template.
labels
Jan 7, 2022
The issue seems to be related to |
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. |
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
This PR is a bit big because AST definitions are modified recently because previous AST defs were too error-prone. It will prevent plugin authors from making some common mistakes. - Closes vercel#33088 - Closes vercel#31084 - Closes vercel#33283
nevilm-lt
pushed a commit
to nevilm-lt/next.js
that referenced
this issue
Apr 22, 2022
This PR is a bit big because AST definitions are modified recently because previous AST defs were too error-prone. It will prevent plugin authors from making some common mistakes. - Closes vercel#33088 - Closes vercel#31084 - Closes vercel#33283
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Run
next info
(available from version 12.0.8 and up)Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64
Binaries:
Node: 14.18.2
npm: 6.14.15
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 12.0.8-canary.19
react: 17.0.2
react-dom: 17.0.2
What version of Next.js are you using?
12.0.8-canary.19
What version of Node.js are you using?
14.18.2
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
After upgrading
next
to version 12 i get aReferenceError: fetchData is not defined
when using early return without braces inside useEffect, in version 11 it works as expected.Running the
next
command in development works as expected, butnext build
andnext start
the error happens.Expected Behavior
Expected to work without the need to add braces.
To Reproduce
Clone this project https://github.com/mjr/next-bug.
Run
next build
and thenPORT=3000 next start
.Open
localhost:3000
e open the console to see the error.The text was updated successfully, but these errors were encountered: