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

396
Visualizações
How to import JavaScript files (fabric.js) in a vaadin Application

I'm working on a Vaadin application which is using spring boot. I want to use the fabric.js framework, but have not managed to import the files without running into Errors yet.

When trying to use the @JavaScript Annotation, I run into following Error:

[v-server-output] c.v.b.devserver.DevServerOutputTracker : ERROR in ./fabric.min.js

[v-server-output] c.v.b.devserver.DevServerOutputTracker : Module not found: Error: Can't resolve 'jsdom' in 'C:\entwicklung\grw2_new\app-and-run\applications\grw\grw-desktop\frontend'

After trying it with a npm installation(https://vaadin.com/directory/component/niiyeboahfabric-canvas), I ran into a similar Error:

[ERROR] ERROR in ../node_modules/tunnel-agent/index.js

[ERROR] Module not found: Error: Can't resolve 'net' in '/.../node_modules/tunnel-agent' ... [ERROR] @ ../node_modules/jsdom/lib/api.js

[ERROR] @ ./fabric.min.js

To avoid the jsdom Error I tried to import the file in a onAttach Method using UI.getCurrent().getPage().addJavaScript("frontend/fabric.min.js"); But Vaadin does not manage to find the specified file, whether I put them in the frontend folder of my project or in META-INF/resources/frontend.

about 4 years ago · Santiago Trujillo
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