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

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