I’m having issues with one of my sites. The build seems to be failing on an import line in one of my JS files, but running all the same commands locally, I don’t have any issues… I don’t know how to debug why Netlify is failing.
The site is built using Svelte and Sapper, and I was initially getting the following error:
‘svelte-icons/fa/FAPenFancy.svelte’ is imported by src/components/features.js, but could not be resolved – treating it as an external dependency
svelte-icons is a package that is in my package.json, so should have been installed when Netlify kicked off the deployment process.
Anyway, to try and get around this, I copied the source files for the couple of icons I was using from that package, into my src directory, and updated the import statements to point to those local versions. However, when Netlify tried to deploy this, I got the following error:
Could not resolve ‘./svelte-icons/FAPenFancy.svelte’ from src/components/features.js
I’ve run the exact same commands locally, and I don’t get any issues. I’ve even tried running netlify dev
on my local, and I still have no issues…
Does Netlify not like Svelte or Rollup? Or what else could be going on here?