![]() ![]() It seems to be bigger than the other files while being similar in code size, but maybe swiper is included in there. In my logs below, the page in question is test.svelte. It is worth noting that the error does not show when navigating to the page with the nav. netlify directory created by the netlify adapter, it uses requires. ![]() when using the dev command) it is all built with imports. It looks to me that the difference is that in the build directory (i.e. Instead change the require of in /var/task/.netlify/server/entries/pages/ to a dynamic import() which is available in all CommonJS modules.Įrror : require() of ES Module /var/task/node_modules/ssr-window/ from /var/task/.netlify/server/entries/pages/ not supported.Īs far as I can tell ssr-window is a dependency of Swiper. This page works fine locally with the dev server, but as soon as I check it live on Netlify, then I get this error on the page where the slideshow is: require() of ES Module /var/task/node_modules/ssr-window/ from /var/task/.netlify/server/entries/pages/ not supported. I don’t know enough of the internals to get if it comes from svelte-kit, the netlify adapter, vite or something else.Ĭurrently I use a Swiper module on one page. I am having problems on a new project and they seem to all be related to require vs import. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |