OpenGIS / inreach-mapshare

Display Your Live inReach MapShare Data on Your WordPress Site
GNU General Public License v2.0
8 stars 1 forks source link

Error trying to build... #6

Open mmcc-xx opened 1 month ago

mmcc-xx commented 1 month ago

I'm running node version v20.13.1

From the inreach-mapshare directory I ran npm install to install dependencies. I got this warning:

npm WARN deprecated grunt-string-replace@1.3.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

I installed grunt with npm install -g grunt-cli and then npm install grunt. When I run grunt --version I get

grunt-cli v1.4.3
grunt v1.6.1

When I run grunt, I get an error that...

Warning: Task "default" not found. Use --force to continue.

I am 100% in the directory with Gruntfile.js. I made no changes to it. I tried running "grunt build-plugin" and get a similar error that the task can't be found.

Any suggestions for fixing this?

More output from running grunt in verbose mode:

Initializing
Command-line options: --verbose, --gruntfile=/home/clark/inreach-mapshare/Gruntfile.js

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Loading "Gruntfile.js" tasks...OK
>> No tasks were registered or unregistered.

No tasks specified, running default tasks.
Running tasks: default
Warning: Task "default" not found. Use --force to continue.

Aborted due to warnings.
mmcc-xx commented 1 month ago

Upon further deubgging, it appears I'm hitting this return statement in Gruntfile.js:

        if (!joe_files.length || !app_files.length) {
              return;
        }

There doesn't seem to be a directory Joe/inc in the repo

Edit: check that - it appears the contents of the Joe directory didn't clone because it is a link to another repo? I am running up against my lack of experience with git and github

Edit 2: I was able to build (though with some errors) after cloning the Joe repo. Some documentation about how to build wouldn't hurt :)

morehawes commented 1 month ago

Edit 2: I was able to build (though with some errors) after cloning the Joe repo.

Yes that's a Git Submodule that needs to be initilised in order to include those base files.

Despite the errors, does the build script complete? (i.e. inreach-mapshare.zip is created with your changes).

Some documentation about how to build wouldn't hurt :)

Apologies 😳 I will endeavour to improve this.

Thank you!

morehawes commented 1 month ago

Hi @mmcc-xx,

I have overhauled the build process in 2.0.0 of the plugin, currently available for testing on the staging branch (release notes here).

My hope is that moving forwards the plugin will be easier to contribute to.

More information here. All input greatly appreciated! ✌️