Comments (8)
Same problem here.
svelte-paginate doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
from svelte-paginate.
Same problem here.
svelte-paginate doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
I solved this simply by adding "type":"module" in package.json of svelte-paginate in node_modules. I have made PR for this at #27
from svelte-paginate.
Fixed in v0.1.0
.
from svelte-paginate.
True, still works.
from svelte-paginate.
svelte-paginate doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
from svelte-paginate.
Make sense, @bas-baskara. It is just important to share that by doing this, we're globally changing the default behavior from ESModules to CommonJS.
from svelte-paginate.
@bas-baskara adding "type":"module"
was helpful, thanks
I also had to add "svelte": "src/index.js"
as well to address this error:
Unknown file extension ".svelte" for /repo/node_modules/svelte-paginate/src/PaginationNav.svelte
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" for /repo/node_modules/svelte-paginate/src/PaginationNav.svelte
at new NodeError (node:internal/errors:372:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:76:11)
at defaultGetFormat (node:internal/modules/esm/get_format:118:38)
at defaultLoad (node:internal/modules/esm/load:21:20)
at ESMLoader.load (node:internal/modules/esm/loader:407:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:326:22)
at new ModuleJob (node:internal/modules/esm/module_job:66:26)
at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:345:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:304:34)
at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:82:21)
Based on this discussion JustinVoitel/svelte-hero-icons#18
If others also have this issue, maybe it can be added to your PR @bas-baskara.
from svelte-paginate.
@jarmitage Yes thank you, I added your suggestion and also typescript support into my PR because I need it in my project too.
from svelte-paginate.
Related Issues (16)
- Question no a bug HOT 1
- on:click HOT 1
- Update controls for accessibilty
- totalPages become undefined HOT 1
- Style LightPaginationNav HOT 1
- Active page number has a small bug HOT 1
- Customizing the options of the LightPaginationNav navigation component
- Bug with using it in the newest version(s) of SvelteKit HOT 4
- Question HOT 1
- Project maintenance HOT 1
- Hint: Could not find a declaration file for module './DarkPaginationNav.svelte'. HOT 6
- Uncaught TypeError: items is undefined HOT 7
- pass state to slot
- Go to top after change currentPage HOT 1
- Is items a keyword
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-paginate.