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

392
Views
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
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!