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

107
Views
Javascript import fails mapbox-gl-draw-rotate-mode module

I am trying to import inside my main.js file a function from the module mapbox-gl-draw-rotate-mode with the following statement: import RotateMode from 'mapbox-gl-draw-rotate-mode'. I get this error:

Uncaught TypeError: Failed to resolve module specifier mapbox-gl-draw-rotate-mode. Relative references must start with either /, ./, or ../. when import in javascript

What I tried to do next is to point the import to the js file of the module. The previous error disappear, but since mapbox-gl-draw-rotate-mode has other dependencies (i.e. @turf), I get back a relative reference error.

I previously created a new project with npm, and then installed the module with npm install.

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!