Skip to content

Failed to run cli validator on linux #41

Open
@IAmChuy

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions