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

160
Views
unpkg.com fails to load jcrop.js.map despite the link working when I click in the view source

I am trying to implement jcrop via this example. It keeps giving me an export error as well as a Devtools error delcaring it can not find the jcrop.js.map. I clicked both the dependencies in the view source and they work and I can't even find where they reference jcrop.js.map so I am unsure if something is wrong with the dependencies or in my code from the example. I put the code into a snippet for reference.

1st error: Uncaught SyntaxError: Unexpected token 'export'

2nd error: DevTools failed to load source map: Could not load content for https://unpkg.com/jcrop.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

  const origin = [150,160,540,270];

  export default {
    data: () => ({
      rect: origin.slice(0),
      options: {
        handles: ['sw','nw','ne','se'],
        aspectRatio: origin[2]/origin[3]
      },
      pos: {}
    }),
    methods: {
      getOrigin() { return origin.slice(0); },
      originalCrop() { this.rect = this.getOrigin(); }
    }
  }
<link rel="stylesheet" href="https://unpkg.com/jcrop/dist/jcrop.css">
<script src="https://unpkg.com/jcrop"></script>

<template>
  <div>
    <Jcrop
      src="https://d3o1694hluedf9.cloudfront.net/sierra-750.jpg"
      @update="pos = $event.sel.round()"
      :rect="rect"
      :options="options"
    />
    <coords :rect="pos"/>
    <button @click="originalCrop()">Reset</button>
  </div>
</template>

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!