Skip to content

Scope error #36

@dtex

Description

@dtex

A user raised this issue over in the Johnny-Five repo.

The problem appears to be caused by this block in interchange.js:

try {
    const manifest = JSON.parse(fs.readFileSync(manifest_file));
} catch (e) {
    console.error('Manifest file incorrect');
    throw e;
}


let manifest_objects = (options.useFirmata ? manifest.firmata : manifest.backpack);

const is scope limited in try blocks so an error is thrown when trying to read manifest.firmata or manifest.backpack.

Metadata

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