Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

457
Vistas
Chrome extension, SyntaxError: Cannot use import statement outside a module

I'm working on a project and I have to create a chrome extension which filters reviews in amazon. Anyway my problem is connecting two javascript files because I get the error "SyntaxError: Cannot use import statement outside a module".

script.js is the file that runs when the chrome extension is activated. makeCall.js is the file I want to call inside script.js and it makes an axios call on a server.

here the codes: enter image description here

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Firstly, you generally want to paste your code in a

code block

instead of a screenshot.

Secondly, your extension isn't declared as an ES6 module. Therefore, to import other JS files, you need to use require(PATH) instead of import

const {
  run
} = require('./makeCall.js')
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda