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

192
Visualizações
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
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