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

76
Visualizações
Require is not defined. Object.crypto object.url

I am trying to upload a file from my react application, and after installing aws-sdk, I am having the following error:

external "crypto":1 Uncaught ReferenceError: require is not defined
    at Object.crypto (external "crypto":1)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/uuid/lib/rng.js (rng.js:4)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/uuid/v4.js (v4.js:1)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/short-uuid/index.js (index.js:7)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/react-aws-s3/dist/react-aws-s3.js (react-aws-s3.js:1)
    at __webpack_require__ (bootstrap:19)

or this one:


external "url":1 Uncaught ReferenceError: require is not defined
    at Object.url (external "url":1)
    at __webpack_require__ (bootstrap:19)
    at Module../node_modules/@aws-sdk/credential-provider-imds/dist/es/fromContainerMetadata.js (index.bundle.js:6294)
    at __webpack_require__ (bootstrap:19)
    at Module../node_modules/@aws-sdk/credential-provider-imds/dist/es/index.js (index.bundle.js:6562)
    at __webpack_require__ (bootstrap:19)
    at Module../node_modules/@aws-sdk/credential-provider-node/dist/es/index.js (tslib.es6.js:239)
    at __webpack_require__ (bootstrap:19)
    at Module../node_modules/@aws-sdk/client-sts/dist/es/runtimeConfig.js (index.bundle.js:5351)
    at __webpack_require__ (bootstrap:19)

Any ideas on how to solve it?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Solve it by changing webpack config to

target: 'web',

src

about 4 years ago · Juan Pablo Isaza 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