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

191
Views
Library constructor is not a function

I'm using Aurelia V2 for javascript UI HTML app, i'm trying to add new library using yarn (the project is configured to use yarn instead of npm), so i did two projects:

  1. first project uses aurelia v2 and is running on my laptop, after that i have executed yarn add interactjs to add this library (interactjs), after run the project uwing npm start o yarn start i can see the web page and a div element can be resized using the mouse pointer, everything goes works well !.

  2. second project is a big project from one of my clients, is using almost the same configuration (aurelia v2 and yarn), so i have added interactjs library with yarn add command and everything goes fine... but when i try to vizualize the web page this error appears in chrome console:

Code

    import * as interact from 'interactjs';

const resizeable = interact('.resizable'); // target elements with the "resizable" CSS class

Error

Uncaught (in promise) TypeError: (0 , _interactjs.interact) is not a function

And the code is the same in both, i have copied library imports from my laptop app to the other app.

My laptop app is running locally, the other app with this issue is running with azure cloud and other security measures like Content Delivery Network (CDN), etc.

I've tried to change the const line to call this as a constructor but after that is showing another error: interact is not a constructor, could be EC6 EC5 compatibility since i can not to see some properties due strict mode in the second app ???

about 4 years ago · Juan Pablo Isaza
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!