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

169
Visualizações
Angular 2 AOT - "Uncaught ReferenceError: exports is not defined error"

I having a problem running Angular 2 app compiled for AoT with Rollup using instructions from angular.io docs (link here)

The compilation process goes OK as far as I can tell though I'm getting this as the only output:

⚠️   'default' is imported from external module 'rollup' but never used

'initializeApp' is not exported by 'node_modules/firebase/firebase-node.js'
'initializeApp' is not exported by 'node_modules/firebase/firebase-node.js'
'app' is not exported by 'node_modules/firebase/firebase-node.js'
'auth' is not exported by 'node_modules/firebase/firebase-node.js'
'database' is not exported by 'node_modules/firebase/firebase-node.js'
'database' is not exported by 'node_modules/firebase/firebase-node.js'

The build.js is created and I have my index.html pointing to it and other required files:

<!DOCTYPE html>
<html>
<head>
    <title>Ahead of time compilation</title>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="dist/shim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.8.9/zone.min.js"></script>
</head>
<body>
    <my-app>Loading...</my-app>
</body>
<script src="dist/build.js"></script>
</html>

However, when I run my app in the browser I get Uncaught ReferenceError: exports is not defined.

Any suggestions on how to resolve it?

about 4 years ago · Santiago Trujillo
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