Flomp / wanderer

wanderer is a self-hosted trail database. Save your adventures!
GNU Affero General Public License v3.0
804 stars 20 forks source link

Problem with meilisearch and svelte during baremetal install #65

Closed stupidgithubslut closed 1 month ago

stupidgithubslut commented 1 month ago

Problem

Following the documentation to install to baremetal, getting a few errors.

When importing dump to meilisearch: Error: dump doesn't exist at "wanderer/search/migrations/migration.dump" the file does exist at that location and permissions are correct

when building frontend:

vite v5.2.11 building SSR bundle for production...
transforming (105) node_modules/@sveltejs/kit/src/constants.js5:02:50 PM [vite-plugin-svelte] /root/wanderer/web/src/routes/trail/edit/[id]/+page.svelte:803:4 Unused CSS selector "#map"
801: 
802: <style>
803:     #map {
         ^
804:         height: calc(400px);
805:     }
5:02:50 PM [vite-plugin-svelte] /root/wanderer/web/src/routes/trail/edit/[id]/+page.svelte:807:8 Unused CSS selector "#map"
805:     }
806:     @media only screen and (min-width: 768px) {
807:         #map,
             ^
808:         form {
809:             height: calc(100vh - 124px);
✓ 428 modules transformed.
x Build failed in 11.23s
error during build:
RollupError: src/routes/trail/edit/[id]/+page.svelte (2:13): "PUBLIC_VALHALLA_URL" is not exported by "virtual:$env/static/public", imported by "src/routes/trail/edit/[id]/+page.svelte".
file: /root/wanderer/web/src/routes/trail/edit/[id]/+page.svelte:2:13
1: <script lang="ts">
2:     import { PUBLIC_VALHALLA_URL } from "$env/static/public";
                ^
3:     import Button from "$lib/components/base/button.svelte";
4:     import Datepicker from "$lib/components/base/datepicker.svelte";
    at getRollupError (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
    at error (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
    at Module.error (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:13858:16)
    at Module.traceVariable (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:14306:29)
    at ModuleScope.findVariable (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:11984:39)
    at ReturnValueScope.findVariable (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
    at FunctionBodyScope.findVariable (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
    at BlockScope.findVariable (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
    at Identifier.bind (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:6908:40)
    at ConditionalExpression.bind (file:///root/wanderer/web/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)

A docker install does work, except it gives an error when making an account and the trails page spits out an internal 500 error. I would prefer not to use docker anyways.

Device Info

Running on a debian 12 LXC on a server on my home network

Flomp commented 1 month ago

Hey there, thanks for giving wanderer a try.

Regarding your first problem: from where are you calling meilisearch? If you are already in wanderer/search directory, then you need to adapt the import path to --import-dump migrations/migration.dump

Regarding your second problem: thanks for the hint. I added the variable to the launch script. Please copy the updated version from the documentation's installation page.

In any case (docker or not), make sure to set the ORIGIN environment variable to the correct value. It must be the URL (including the port) that you type into your browser to access wanderer. Otherwise, you will run into the 500 error you describe.

Cheers

stupidgithubslut commented 1 month ago

Hey thanks! Feeling a little dumb, that first one should have been obvious haha. Fixed the environment variables and everythings working great now, thanks!