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 encountering this issue and I was able to overcome it by installing the @babel/plugin-syntax-bigint package. So I ran yarn add @babel/plugin-syntax-bigint, then in my babel.config.json file I added it to the plugins array like so:
{
"plugins": ["@babel/plugin-syntax-bigint"]
}
Also, wherever you are deploying it to don't forget to clear your cache/delete node_modules
Describe the bug
Adding the following line causes an error in a site built with
react-scripts build
, but works fine withreact-scripts start
Did you try recovering your dependencies?
yes
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from C:\Users\lain\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app
System:
OS: Windows 10 10.0.19042
CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.41)
Internet Explorer: 11.0.19041.1202
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 4.0.3 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
npx create-react-app .
const TEST = 2n ** 3n;
to the top of index.jsyarn build
andserve build
to see the erroryarn start
to see it work correctlyExpected behavior
The page loads without error.
Actual behavior
The page does not load, there is an error in the console.
Reproducible demo
https://github.com/0xlain/cra-bug
The text was updated successfully, but these errors were encountered: