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

yarn start failed after upgrading #11790

Open
Mouaadouk302 opened this issue Dec 17, 2021 · 4 comments
Open

yarn start failed after upgrading #11790

Mouaadouk302 opened this issue Dec 17, 2021 · 4 comments

Comments

@Mouaadouk302
Copy link

i have upgraded react-scripts to v5 and node to v16 & i get error when starting the project knowing that I have reinstalled node_modules.

image (1)

output :
yarn run v1.22.5
$ react-scripts start
Failed to compile.

For the selected environment is no default script chunk format available:
JSONP Array push can be chosen when 'document' or 'importScripts' is available.
CommonJs exports can be chosen when 'require' or node builtins are available.
Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@raix
Copy link
Contributor

raix commented Dec 18, 2021

Hi @Mouaadouk302 thanks for reporting,
Try removing your lockfile and delete node_modules again, then install to see if the issue is fixed

Please add steps to replicate the issue or better a repository replicating the issue

@gnowland
Copy link

Remove any mention of node from your browserslist entry in package.json. That fixed it for me.

@olawalejuwonm
Copy link

removing browserslist and allowing the command to use the default one works for me

@suraj5969
Copy link

suraj5969 commented Mar 27, 2022

removing browserslist and allowing the command to use the default one works for me

worked for me. Thanks @olawalejuwonm

for others,
Just delete the browserslist object form your packege.json and run command again

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

5 participants