Skip to content

Tutorial Errors #25

Open
Open
@Sirbeastian

Description

@Sirbeastian

Noticed that the Pokemon tutorial appears to be broken in a couple of places

  1. Sandbox Tutorial

After finishing, running command
node sandbox/sandbox.tasker.pokemonInfoHelper.js'
gives error "FIle you are testing does not exist: [...]/TaskerJavaScriptHelpers-master/src/pokemonInfoHelper.js"

Found the issue - the Sandbox file doesn't include lines to rename the file.
Should require 'path' at the start and replace the final line with

const currentScriptFilename = path.basename(__filename);
const scriptFilenameToTest = currentScriptFilename.replace('sandbox.', '');
taskerSandbox(scriptFilenameToTest, taskerLocalVariables);
  1. Exporting Script Tutorial

This step just doesn't work. Running npm run taskerfy gives error message:

[...]/TaskerJavaScriptHelpers-master/src/tasker.pokemonInfoHelper.js
  25:35  error    'pokemon_json' is not defined                  no-undef
  26:34  error    'use_shiny_image' is not defined               no-undef
  64:58  warning  Newline required at end of file but not found  eol-last

Can't find what's causing it to not import the local variables, but I'm basically a novice so it might be something obvious. Tried to check how the example one for Sparkle Laundry does it but can't figure it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions