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

103
Vistas
My javascript won't work on my OVH server

I'm currently working on a portfolio and I wanted to upload it on a server so I could show it to people on any computer. Here is the "stack" of my website: HTML / CSS / SCSS / JS (native + GSAP)

In my local environment, everything is working fine (like literally 0 issue)

Id uploaded my website on an OVH server (it worked for other projects so I don't think the issue is there but idk..)

My issue is, when I lookup my website, there is no javascript. It is due to an error :

Cannot use import statement outside a module (at script.js:1:1).

The concerned line is :

import { gsap } from "gsap"; 

I already looked that up on internet and tried various solutions (adding type: module in package.json, change paths, replace 'import' by 'require', etc..), yet nothing has worked, and I can't "publish" this website.

Would anybody have an explication regarding all thoses details ?

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

0

You probably have gsap on your node_modules folder, which might not be in your website. Instead of using it installed by npm, use the <script> tag in you html file as suggested by the gsap docs:

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/gsap.min.js"></script>

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