minecraft-creator-tools icon indicating copy to clipboard operation
minecraft-creator-tools copied to clipboard

Failed to run cli validator on linux

Open thedevchuy opened this issue 1 year ago • 1 comments

When trying to run the creator tools via the cli tool via a github action on ubuntu-latest I get the following error.

/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@minecraft/creator-tools/storage/StorageUtilities.js:327
        let lastSlash = path.lastIndexOf("/", path.length - 1);
                             ^
TypeError: path.lastIndexOf is not a function
    at StorageUtilities.getFolderPath (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@minecraft/creator-tools/storage/StorageUtilities.js:327:30)
    at loadProjects (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@minecraft/creator-tools/cli/index.js:235:63)
    at /opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/@minecraft/creator-tools/cli/index.js:[19](https://github.com/ShapescapeMC/Scary-Mobs-Addon/actions/runs/11125097186/job/30912056959#step:12:20)5:11
Node.js v18.20.4

This is the command I used: npx mct validate addon -if PATH -o ./output -lv

Tested this with Node version 20.x as well, but still had the same error. It works fine locally on my windows machine.

thedevchuy avatar Oct 01 '24 12:10 thedevchuy

OK, I did a basic test pass on ubuntu and things seemed to work; I guess the issue is that something inside of a GH action is not quite working.

mammerla avatar Jan 07 '25 17:01 mammerla