Unable to import a npm module I downloaded

265 Views Asked by At

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?

0

There are 0 best solutions below