#Rollup failed to resolve import

16 messages · Page 1 of 1 (latest)

wintry shadow
#

Hey guys I'm using this lottie integration here and if I run npm build it works fine, but if I deploy to vercel then there's a build error.

Any clue on what's going on here?

Rollup failed to resolve import "astro-integration-lottie/lottie.astro" from "/vercel/path0/src/components/SectionTwo.astro".

#

it's loading fine in my dev environment as well

wanton silo
#

Hi 👋

#

are you deploying to edge?

#

unless there is a problem with integration itself SadgeArrive

wintry shadow
#

I’ll try this 👍

wintry shadow
#

I installed the vercel adapter and included my json file like in the docs and got the same error

wintry shadow
#

I removed the lottie integration and my deploy worked fine

#

I'm gonna try luge instead

wanton silo
wintry shadow
#
<div class="animation"></div>

<script>
  import lottie from 'lottie-web';
  import myAnimation from '../../public/realEditedLottie.json';

  const animationContainer = document.querySelector('.animation');

  lottie.loadAnimation({
    container: animationContainer,
    renderer: 'svg',
    loop: true,
    autoplay: true,
    animationData: myAnimation,
  });
</script>

That's the code in particular incase you'd like to use lottie

#

The airbnb documentation is a maze only to find that much code.