jspreadsheet / jspreadsheet/ce
Failed Importing the Lib
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 890
- PR merge metrics
- No merged PRs in 30d
Description
Try using this lib, but got error:
<script lang="ts">
import { onMount } from 'svelte';
import jspreadsheet from 'jspreadsheet-ce';
import 'jspreadsheet-ce/dist/jspreadsheet.css';
// Global Variables
export let jsprInst: jspreadsheet.JspreadsheetInstance = null;
export let jsprOpts: jspreadsheet.JSpreadsheetOptions = {};
// Local Variables
let tableEl: HTMLDivElement;
let defaultOpts: jspreadsheet.JSpreadsheetOptions = {
minDimensions: [1000, 100000]
};
onMount(() => {
jsprInst = jspreadsheet(tableEl, {...defaultOpts, ...jsprOpts});
});
</script>
<div bind:this={tableEl}></div>
Error:
'default' is not exported by node_modules/jspreadsheet-ce/dist/index.js, imported by src/components/jspreadsheet-ce.svelte
1: <script lang="ts">
2: import { onMount } from 'svelte';
3: import jspreadsheet from 'jspreadsheet-ce';
^
4: import 'jspreadsheet-ce/dist/jspreadsheet.css';
error during build:
Error: 'default' is not exported by node_modules/jspreadsheet-ce/dist/index.js, imported by src/components/jspreadsheet-ce.svelte
...
Any idea what might happened?
Thanks,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/components/jspreadsheet-ce.svelte and inspect node_modules/jspreadsheet-ce/dist/index.js, focusing on the import/export mismatch shown by the build error. Reproduce the build with this component and confirm that the import resolves without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100