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

200
Visualizações
Why are there two of the same file in my network tab?

I am currently trying to use require to import the module "js-big-decimal". I am getting the errors:

js-big-decimal.js:10 Uncaught ReferenceError: global is not defined
    at js-big-decimal.js:10
require.js:1961 GET https://igneous-spider-328623.uk.r.appspot.com/js-big-decimal.js net::ERR_ABORTED 404
require.js:168 Uncaught Error: Script error for "js-big-decimal"
https://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:168)
    at HTMLScriptElement.onScriptError (require.js:1738)

I'm assuming this because I have a syntax error somewhere when trying to import my modules. In my HTML I have:

<script src="/node_modules/requirejs/require.js"></script>
<script src="/node_modules/js-big-decimal"></script>

and in my javascript I have:

require(['require', 'js-big-decimal'], function (require) {
    var bigDecimal = require('./node_modules/js-big-decimal')
});

And in my package.json:

"dependencies": {
    "express": "^4.17.1",
    "js-big-decimal": "^1.3.4",
    "nodejs": "0.0.0",
    "requirejs": "^2.3.6",
  }

When looking in my network tab, it shows that I have two different version of js-big-decimal.js and I am getting a 404 on one of them, as seen below:

Network tab

I've never really looked in the network tab so I'm not sure what I'm looking at. But if anyone could shed some light on where I'm going wrong would be great.

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