Can't get the demo to run locally
slokhorst opened this issue · comments
Sebastiaan Lokhorst commented
Following the instructions from README#Development build:
git clone https://github.com/ANovokmet/svelte-gantt.git
cd svelte-gantt
npm install
npm run demo:dev
Results in:
> svelte-gantt@4.2.4 demo:dev
> cd demo && npm run dev
> test1@0.0.1 dev
> vite dev
sh: line 1: vite: command not found
Sebastiaan Lokhorst commented
I got the demo running with the changes from #214.
Most pages now work, with the exception of the /svelte-component
page, which gives the following error:
Failed to load url /test/svelte-gantt/dist/svelte (resolved id: /test/svelte-gantt/dist/svelte) in /test/svelte-gantt/demo/src/routes/svelte-component/+page.svelte. Does the file exist?
Error: Not found: /test/svelte-gantt/dist/svelte
at resolve (/test/svelte-gantt/demo/node_modules/@sveltejs/kit/src/runtime/server/respond.js:483:13)
at resolve (/test/svelte-gantt/demo/node_modules/@sveltejs/kit/src/runtime/server/respond.js:277:5)
at #options.hooks.handle (/test/svelte-gantt/demo/node_modules/@sveltejs/kit/src/runtime/server/index.js:49:56)
at Module.respond (/test/svelte-gantt/demo/node_modules/@sveltejs/kit/src/runtime/server/respond.js:274:40)
It seems that the dist/svelte
file does indeed not exist:
svelte-gantt > ls dist/
index.iife.js
index.iife.js.map
index.js
index.js.map
LICENSE.txt
package.json
README.md
types/
Do I need to run another script to build dist/svelte
?
Sebastiaan Lokhorst commented
Ah found it! Should have run npm run package
instead of node tools/build
. See 122ce8a
Ante Novokmet commented
Thank you!