Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: moode 9.0.1 moodeutl error
#1
in moode 9.0.1 running moodeutl i get the error:

Undefined constant "FEAT_RESERVED" in /usr/local/bin/moodeutl:35

Commenting line 35 solved the issue.
Note: before i encountered this error i followed the instructions to setup a development environment as described here:
https://github.com/moode-player/docs/blo...-end-stuff
Since this is a rather obvious error i assume this might be related.

HTH
tom
Reply
#2
(06-09-2024, 03:31 PM)rawdlite Wrote: in moode 9.0.1 running moodeutl i get the error:

Undefined constant "FEAT_RESERVED" in /usr/local/bin/moodeutl:35

Commenting line 35 solved the issue.
Note: before i encountered this error i followed the instructions to setup a development environment as described here:
https://github.com/moode-player/docs/blo...-end-stuff
Since this is a rather obvious error i assume this might be related.

HTH
tom

You're going to have to give details about what you actually did.

I copied the script from the end of that Developing with Gulp document to a file create_dev_env.sh on a Pi which has a copy of moOde 9.0.1.

I edited the script to change those "\_" string separators to "_" so it would run in Linux. Ran the script. Ran moodeutl -l. Everything works as expected.

Regards,
Kent
Reply
#3
(06-09-2024, 07:52 PM)TheOldPresbyope Wrote: You're going to have to give details about what you actually did.

-Fresh install of moode 9.0.1 on a pi5 via Raspberry Pi Imager
Followed Instructions as given at https://github.com/moode-player/docs/blo...-end-stuff
~ $ cd ~
~ $ sudo apt-get update
~ $ sudo apt-get -y install npm # git is also required (maybe extend documentation?)
~ $ git clone https://github.com/moode-player/moode.git
~ $ cd moode
~/moode $ npm ci
~/moode $ node_modules/.bin/gulp build
~/moode $ node_modules/.bin/gulp deploy --test
~/moode $ sudo mv /var/www /var/www.org
~/moode $ sudo node_modules/.bin/gulp deploy
~/moode $ moodeutl -r

-> got error as described above

Noticed in package.json
Code:
"name": "moOde",
 "version": "8.1.1",
Branch was develop. (is this the right branch?)
I checked out master. -> Same Version in package.json

Should I edit the Version in package.json?

(06-09-2024, 07:52 PM)TheOldPresbyope Wrote: I copied the script from the end of that Developing with Gulp document to a file create_dev_env.sh on a Pi which has a copy of moOde 9.0.1.

I edited the script to change those "\_" string separators to "_" so it would run in Linux. Ran the script. Ran moodeutl -l. Everything works as expected.

Regards,
Kent
So you ran the script from 7. Appendix in the documentation while I followed TL;DR
Did you do a fork or a clone?
What did you use as GIT_USER_NAME?

Just did a fresh install and moodeutl is giving no error.

then i run this script

Code:
#!/bin/bash
#
# Setup Gulp build environment for moOde
#

cd ~
# Install packages
sudo apt-get update
sudo apt-get -y install npm git
# 2. Alternative is to clone the repo
git clone https://github.com/moode-player/moode.git
cd moode
npm ci
node_modules/.bin/gulp build
node_modules/.bin/gulp deploy --test

# create a backup of the original www root
sudo mv /var/www /var/www.org
sudo node_modules/.bin/gulp deploy
moodeutl -r

PHP Fatal error:  Uncaught Error: Undefined constant "FEAT_RESERVED" in /usr/local/bin/moodeutl:35
Stack trace:
#0 {main}
  thrown in /usr/local/bin/moodeutl on line 35

So somewhere along this lines my moodeutl gets changed.

I added this in the penultimate line in my script
Code:
sudo cp usr/local/bin/moodeutl /usr/local/bin/moodeutl

And it runs without error.

What about adding such a script to the distribution?
Reply
#4
or use build --force
Reply
#5
@grumbleweed 

Ah, sorry, the penny finally dropped.

Did you read the first line of the Gulp document?


Quote:This document explains how to use the Gulp toolkit to automate building the moOde front-end.


That was it's original intent AIUI. ETA - this front-end development can be done on any host, such as my Linux laptop, not just the Pi under test.

It's only when one gets deep into the document that one finds

Quote:5.4. Front-end and back-end development on the Raspberry Pi

In this case both front-end (HTML/CSS/JS) and back-end (PHP/BASH/Python) development is being done on a Raspberry Pi (target).

Every time you make a change to a back-end file that needs to deployed for test the following is done:

and the use of gulp deploy --force

Regards,
Kent
Reply


Forum Jump: