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

107
Visualizações
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 Respostas
Responde à pergunta

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 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