Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!