Skip to content

Error with installation : "TypeError: Cannot read properties of undefined (reading 'BeforeTool')" #506

@djamatgit

Description

@djamatgit

Bellow the error i just got during installation of last version. This never happened before :

C:\Users\mathi>curl -fsSL https://plannotator.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Fetching latest version...
Installing plannotator v0.17.1...

plannotator v0.17.1 installed to C:\Users\mathi.local\bin\plannotator.exe

C:\Users\mathi.local\bin is not in your PATH.

Add it permanently with:

setx PATH "%PATH%;C:\Users\mathi.local\bin"

Or add it for this session only:

set PATH=%PATH%;C:\Users\mathi.local\bin
Updated plugin hooks at C:\Users\mathi.claude\plugins\marketplaces\plannotator\apps\hook\hooks\hooks.json
Installed /plannotator-review command to C:\Users\mathi.claude\commands\plannotator-review.md
Installed /plannotator-annotate command to C:\Users\mathi.claude\commands\plannotator-annotate.md
Installed /plannotator-last command to C:\Users\mathi.claude\commands\plannotator-last.md
Installed skills to C:\Users\mathi.claude\skills\ and C:\Users\mathi.agents\skills
Installed Gemini policy to C:\Users\mathi.gemini\policies\plannotator.toml
[eval]:1
const fs=require('fs');const s=JSON.parse(fs.readFileSync('C:/Users/mathi/.gemini/settings.json','utf8'));if(s.hooks.BeforeTool)s.hooks.BeforeTool=[];s.hooks.BeforeTool.push({matcher:'exit_plan_mode',hooks:[{type:'command',command:'plannotator',timeout:345600}]});fs.writeFileSync('C:/Users/mathi/.gemini/settings.json',JSON.stringify(s,null,2)+'\n');
^

TypeError: Cannot read properties of undefined (reading 'BeforeTool')
at [eval]:1:118
at runScriptInThisContext (node:internal/vm:209:10)
at node:internal/process/execution:446:12
at [eval]-wrapper:6:24
at runScriptInContext (node:internal/process/execution:444:60)
at evalFunction (node:internal/process/execution:279:30)
at evalTypeScript (node:internal/process/execution:291:3)
at node:internal/main/eval_string:74:3

Node.js v22.18.0
Added plannotator hook to C:\Users\mathi.gemini\settings.json
Installed Gemini slash commands to C:\Users\mathi.gemini\commands\

Test the install:
echo {"tool_input":{"plan":"# Test Plan\n\nHello world"}} | plannotator

Then install the Claude Code plugin:
/plugin marketplace add backnotprop/plannotator
/plugin install plannotator@plannotator

The /plannotator-review, /plannotator-annotate, and /plannotator-last commands are ready to use

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