0

I'm running a SvelteKit application with the Animate on Scroll (aos) module. This worked like a charm but due to the nature of my project, I needed to modify a few lines in the module, so I pulled the project from GitHub, modified it, rebuilt it and imported it via a local dependency:

"dependencies": {
    "aos": "file:/path/to/aos"
}

Whenever I try to import the module now however: import AOS from 'aos';, I get this error message:

Uncaught (in promise) SyntaxError: The requested module '/@fs/C:/path/to/aos/dist/aos.js' does not provide an export named 'default'

Note that this also happens when I pull the repository and try to import it locally without changing it. Why does this happen and how can I fix it?

koean
  • 36
  • 1
  • 5
  • I also tried to create a barebone SvelteKit app using `npm init svelte@next test-app` and install the package there - with the same result ... – koean Nov 04 '21 at 10:19
  • I have now temporarily included the minified JS and CSS files as static imports on the page to at least get it to work, even if it's not pretty – koean Nov 08 '21 at 14:50

0 Answers0