tri2820 / muer

Self-hosted music player 🐧🎵
https://muer.netlify.app
GNU Affero General Public License v3.0
186 stars 10 forks source link

Unclear instructions for local deployment without knowledge of the JavaScript ecosystem #2

Closed notepass closed 1 year ago

notepass commented 1 year ago

Thanks for publishing the project, I am looking forward to deploying it on my server!

But I am currently facing a bit of an issue. The readme is not terrible clear on how to deploy the application locally. There is this part:

Host on your own platform & alternative PaaS

By hosting Muer on various platforms, you help ensure the future of this project. While we use Netlify by default due to its simplicity and speed, we highly encourage individuals to explore and document their experiences with running Muer on alternative platforms.

To run production server on your own platform using Netlify Dev

npm run start

Or using Remix App Server

cp remix.config.remixappserver.js remix.config.js
npm run build
npm run start-remixappserver

Which already gives some pointers :) But, I am not well versed in the JS ecosystem. I do not know what either Netlify Dev or Remix App Server are, or which advantages or disadvantages each implementation has.

Trying to follow the commands, I get different errors. When calling npm run build for the Remix App Server part, I got:

npm run build

> build
> run-s build:*

sh: line 1: run-s: command not found

After a bit of googeling I ran across this issue, which told me to run npm ci. This solved the problem for npm run build. But trying npm run start-remixappserver now leads to a new error when trying to start the application. Which means that I am probably missing something.

If it is of any relevance, the current error is:

npm run start-remixappserver 

> start-remixappserver
> dotenv remix-serve build

/tmp/muer/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10
        throw new Error(prefix);
              ^
Error: Invariant failed
    at invariant (/tmp/muer/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10:15)
    at Object.<anonymous> (/tmp/muer/build/index.js:242:35)
    at Module._compile (node:internal/modules/cjs/loader:1257:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1311:10)
    at Module.load (node:internal/modules/cjs/loader:1115:32)
    at Function.Module._load (node:internal/modules/cjs/loader:962:12)
    at Module.require (node:internal/modules/cjs/loader:1139:19)
    at require (node:internal/modules/helpers:121:18)
    at Object.<anonymous> (/tmp/muer/node_modules/@remix-run/serve/dist/cli.js:34:13)
    at Module._compile (node:internal/modules/cjs/loader:1257:14)

If you have the time, I would really appreciate it, if you could add a bit more information to the selfhosting part, for older farts like me that do not interact much with the JS ecosystem.

Normally I would offer assistance with documentation like this, but I cannot do that because of my limited knowledge. But I could offer to be a guinea pig for changes to the documentation in that part.

tri2820 commented 1 year ago

Hi @notepass, you need to run npm install and cp .env.sample .env to fix those errors. This is already in the readme file but I would refactor to make it clearer. Thanks for pointing out.

tri2820 commented 1 year ago

@notepass Can you run these commands https://github.com/muer-org/muer#self-hosting and see if the production server works correctly? Docs have been updated.

notepass commented 1 year ago

Thanks for the rework and response :) And sorry for the delayed answer.

Sadly my laptop broke over the weekend. If I get it back after repairs I will check it out.

tri2820 commented 1 year ago

Close as docker seems working fine now

notepass commented 1 year ago

@notepass Can you run these commands https://github.com/muer-org/muer#self-hosting and see if the production server works correctly? Docs have been updated.

Thanks for updating, now it works <3