Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/@wx_trial-svelte-filemanager.js?v=92d8dae4' does not provide an export named 'default' (at FileMgrKds.svelte:2:12)
<script>
import Filemanager from "@wx/trial-svelte-filemanager";
const rawdata = [
{
id: "/Code",
size: 4096,
date: new Date(2023, 11, 2, 17, 25),
type: "folder",
},
{
id: "/Music",
size: 4096,
date: new Date(2023, 11, 1, 14, 45),
type: "folder",
},
{
id: "/Info.txt",
size: 1000,
date: new Date(2023, 10, 30, 6, 13),
type: "file",
},
{
id: "/Code/Datepicker/Year.svelte",
size: 1595,
date: new Date(2023, 11, 7, 15, 23),
type: "file",
},
{
id: "/Pictures/162822515312968813.png",
size: 510885,
date: new Date(2023, 11, 1, 14, 45),
type: "file",
},
];
</script>
<Filemanager data={rawdata} />
my main.app
<script>
import Counter from './lib/Counter.svelte'
import FileMgr from './lib/FileMgrKds.svelte'
</script>
<main>
<h1>Vite + Svelte</h1>
<div class="card">
<Counter />
<FileMgr />
</div>
<p>
Check out <a href="https://github.com/sveltejs/kit#readme" target="_blank" rel="noreferrer">SvelteKit</a>, the official Svelte app framework powered by Vite!
</p>
<p class="read-the-docs">
Click on the Vite and Svelte logos to learn more
</p>
</main>
<style>
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.svelte:hover {
filter: drop-shadow(0 0 2em #ff3e00aa);
}
.read-the-docs {
color: #888;
}
</style>
my installer
#!/bin/bash
# Define the project directory
PROJECT_DIR="myfiles"
# Check if the directory exists
if [ ! -d "$PROJECT_DIR" ]; then
# Create the Svelte project
pushd $PROJECT_DIR
npm create vite@latest $PROJECT_DIR -- --template svelte --yes
npm install
npm config set @wx:registry https://npm.svar.dev
npm install @wx/trial-svelte-filemanager
npm install @wx/trial-svelte-gantt
npm install @wx/trial-svelte-grid
#npm run dev
popd
else
echo "$PROJECT_DIR already exists."
fi