egjs-infinitegrid
egjs-infinitegrid copied to clipboard
build failed with sveltekit latest version
Description
After update to latest SvelteKit, and run build , it failed. but npm run dev is fine, i am a backend developer , so not familiar with npm too much.
Here error log from VS file:///C:/Users/LAN/Desktop/Svelte/BBS/.svelte-kit/output/server/entries/pages/HomePage.svelte.js:2 import { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid as MasonryInfiniteGrid$1 } from "@egjs/infinitegrid"; ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Named export 'CONTAINER_CLASS_NAME' not found. The requested module '@egjs/infinitegrid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:
import pkg from '@egjs/infinitegrid'; const { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid: MasonryInfiniteGrid$1 } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:409:24)
at async Promise.all (index 0)
at async respond$1 (file:///C:/Users/LAN/Desktop/Svelte/BBS/.svelte-kit/output/server/index.js:1945:13)
at async resolve (file:///C:/Users/LAN/Desktop/Svelte/BBS/.svelte-kit/output/server/index.js:2333:114)
at async respond (file:///C:/Users/LAN/Desktop/Svelte/BBS/.svelte-kit/output/server/index.js:2283:22)
at async visit (file:///C:/Users/LAN/Desktop/Svelte/BBS/node_modules/@sveltejs/kit/dist/prerender.js:626:20)
SyntaxError: Named export 'CONTAINER_CLASS_NAME' not found. The requested module '@egjs/infinitegrid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:
import pkg from '@egjs/infinitegrid'; const { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid: MasonryInfiniteGrid$1 } = pkg;
SyntaxError: Named export 'CONTAINER_CLASS_NAME' not found. The requested module '@egjs/infinitegrid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:
import pkg from '@egjs/infinitegrid'; const { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid: MasonryInfiniteGrid$1 } = pkg;
SyntaxError: Named export 'CONTAINER_CLASS_NAME' not found. The requested module '@egjs/infinitegrid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:
import pkg from '@egjs/infinitegrid'; const { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid: MasonryInfiniteGrid$1 } = pkg;
SyntaxError: Named export 'CONTAINER_CLASS_NAME' not found. The requested module '@egjs/infinitegrid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:
import pkg from '@egjs/infinitegrid'; const { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid: MasonryInfiniteGrid$1 } = pkg;
SyntaxError: Named export 'CONTAINER_CLASS_NAME' not found. The requested module '@egjs/infinitegrid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:
import pkg from '@egjs/infinitegrid'; const { Renderer, CONTAINER_CLASS_NAME, INFINITEGRID_METHODS, MasonryInfiniteGrid: MasonryInfiniteGrid$1 } = pkg;
file:///C:/Users/LAN/Desktop/Svelte/BBS/node_modules/@sveltejs/kit/dist/prerender.js:460 throw new Error(format_error(details, config)); ^
Error: 500 / at file:///C:/Users/LAN/Desktop/Svelte/BBS/node_modules/@sveltejs/kit/dist/prerender.js:460:11 at save (file:///C:/Users/LAN/Desktop/Svelte/BBS/node_modules/@sveltejs/kit/dist/prerender.js:744:4) at visit (file:///C:/Users/LAN/Desktop/Svelte/BBS/node_modules/@sveltejs/kit/dist/prerender.js:635:3)
Steps to check or reproduce
update to latest Sveltekit with static adapter and npm run build
@kenchan97
Try
@egjs/[email protected]version.Thank you :)
I tried, but there is nothing to change in result
@GrassHopper42
@egjs/infinitegrid4.7.0@egjs/react-infinitegrid4.7.0@egjs/svelte-infinitegrid4.7.0@egjs/vue-infinitegrid4.7.0@egjs/vue3-infinitegrid4.7.0@egjs/ngx-infinitegrid4.7.0
Updated to the latest version
thank your response