Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better "install from source" documentation, please? #83

Closed
anae-git opened this issue Jan 30, 2023 · 5 comments
Closed

Better "install from source" documentation, please? #83

anae-git opened this issue Jan 30, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@anae-git
Copy link

anae-git commented Jan 30, 2023

Could someone flesh out the install from source documentation a bit, please?

I think it is something along the lines of (but I am probably missing something):

git clone https://github.com/nioc/xmpp-web.git
cd xmpp-web
edit public/local.js
 - set at least the websocket url and defaultDomain
npm run build
npm run dev

along with an nginx proxy config and the bare minimum prosody config would be really nice to see broken out.

@anae-git anae-git added the enhancement New feature or request label Jan 30, 2023
@nioc
Copy link
Owner

nioc commented Jan 30, 2023

Hello, yes it is the following:

git clone https://github.com/nioc/xmpp-web.git
cd xmpp-web
edit public/local.js
npm ci
npm run build

Then you will have a dist folder which contains all the assets to put on a web server (Apache, Nginx, ...).

@nioc nioc added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jan 30, 2023
@nioc nioc closed this as completed in 13b53b6 Jan 30, 2023
@nioc nioc self-assigned this Jan 30, 2023
@anae-git
Copy link
Author

Thank you very much. One thing I found strange was that I had to go through and fix a bunch of ternaries because of:

$ npm run build

> xmpp-web@0.9.6 build
> vite build

failed to load config from /var/www/xmpp-web/vite.config.js
error during build:
/var/www/xmpp-web/node_modules/vite-plugin-pwa/dist/index.js:107
    const swType = options2.devOptions.type ?? "classic";
                                             ^

As in, turn that into const swType = options2.devOptions.type ? options2.devOptions.type : "classic"; many times in that file to make it work. I assume I have the wrong version of something installed that doesn't support ?? but I am on an up to date Debian 11.6 VM.

@anae-git
Copy link
Author

Looks like Debian 11's Node 12.22 is too old. I manually installed Node 16.19.0 to fix it.

@nioc
Copy link
Owner

nioc commented Jan 30, 2023

"Node 12" 😱 Many libraries won't works with older node versions (current LTS version is 18 😉).

@nioc
Copy link
Owner

nioc commented Jan 30, 2023

I recommend you install LTS version from this script:

curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&\
apt-get install -y nodejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants