My first answer is a question: Why are you deploying your node_modules
folder? That is generally not needed on static websites: they're used to build the site, but then not needed at runtime, since, well, "runtime" is just "send this file" not "run this code" on the Netlify CDN server. Perhaps you've set your "publish directory" wrong in the site's build & deploy settings and are deploying your source code too, rather than just the finished build?
In case you do for some reason need to deploy node_modules
for some reason, you can in general do so. The message is quite clear - don't send filenames with #
or ?
in them. Those are not valid filenames per the HTTP spec - #
is for designating anchors, and everything after the # is used client-side and thus won't map correctly to your file. ?
is for denoting query string parameters and similarly won't work as you're intending to read the file whose name contains ?
but rather cutting off the filename that the server will (attempt to) serve, before the ?
character.