Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021

When creating a react app via npx create-react-app and running it, a warning pops up in DevTools (Chrome 88 and 89):

scheduler.development.js:298 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.

Environment

  current version of create-react-app: 4.0.1
  running from /Users/mahdi/.npm/_npx/25767/lib/node_modules/create-react-app
  Binaries:
    Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
  Browsers:
    Chrome: 88.0.4324.96
    Edge: 87.0.664.66
    Firefox: 84.0
    Safari: 14.0.2
  npmPackages:
    react: ^17.0.1 => 17.0.1
    react-dom: ^17.0.1 => 17.0.1
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

enter image description here

Steps to reproduce

  1. npx create-react-app myapp
  2. cd myapp && npm start Open
  3. http://localhost:3000 in Chrome 88 or 89, regular or Incognito mode
  4. Open DevTools: the warning is displayed

Any suggestion for resolving this warning?

over 4 years ago · Santiago Trujillo
7 Respostas
Responde à pergunta

0

As the warning shows, Chrome will require cross-origin isolation starting version 91 in order to use SharedArrayBuffer. As far as I know there is nothing you can do to resolve the warning other then wait for a react update.

Others are also having this issue as you can see here and here

The issue is fixed in this pull request but has not yet been released.

Edit: It is now fixed in version 17.0.2 of react.

over 4 years ago · Santiago Trujillo Relatório

0

Update the react and react-dom versions from 17.0.1 to ==> 17.0.2 could resolve this problem.

You just need to run npm update in the command prompt or bash, and hopefully you will see the changes in your package.json file. (yarn upgrade react --latest and yarn upgrade react-dom --latest if you want the upgrade to persist to the package.json)

Here is a git report from my app after applying the update:

image of git report

over 4 years ago · Santiago Trujillo Relatório

0

Actually after update react-dom to the latest version solved by me the problem, react alone did not solve it:

npm i react@latest react-dom@latest

OR

yarn add react@latest react-dom@latest
over 4 years ago · Santiago Trujillo Relatório

0

I know you have got your answer, but if someone only use: npm i react@latest react-dom@latest will not update react and react-dom to version 17.0.2 if current version react and react-dom is 16.x.x and your project is not EJECTED. That command is only update to react and react-dom to version 16.14.0. If you are in this case, you need to migrate react-script, react and react-dom version to 17 first: npm install react-scripts@4.0.0 react@17.0.0 react-dom@17.0.0. More informations: https://dev.to/keonik/upgrading-to-react-17-create-react-app-edition-fe

over 4 years ago · Santiago Trujillo Relatório

0

This issue has been fixed in React version 17.0.2 If you use also react-dom, you should also update it. Running npm update (or corresponding command in yarn, or whatever manager you're using) will update everything, and so, solve the deprecation warning.

This is my package.json after update:

screenshot from github desktop

over 4 years ago · Santiago Trujillo Relatório

0

For those not ready to upgrade to v17 yet (due to other legacy libraries), a simple workaround is to place the following code in any part of your index.html

    <script>
      // See https://github.com/facebook/react/issues/20829#issuecomment-802088260
      if (!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer;
    </script>
over 4 years ago · Santiago Trujillo Relatório

0

Update the react and react-dom versions to 17.0.2, yarn upgrade react --latest and yarn upgrade react-dom --latest

Also if using @hot-loader/react-dom or react-hot-loader, need to run yarn upgrade @hot-loader/react-dom --latest and yarn upgrade react-hot-loader --latest also.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda