Mojang / minecraft-creator-tools

A set of tools for creating content and add-ons for Minecraft Bedrock Edition.
Other
70 stars 3 forks source link

Failed to run cli validator on linux #41

Open IAmChuy opened 1 month ago

IAmChuy commented 1 month ago

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.