danielgtaylor / danielgtaylor/aglio

TypeError: token.attrGet is not a function

Open
#319 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
4.7k
Forks
471
PR merge metrics
No merged PRs in 30d

Description

```bash
"TypeError: token.attrGet is not a function",
" at /home1/user/61916c91a4e81be8/node_modules/markdown-it-anchor/index.js:79:24",
" at Array.forEach (native)",
" at Array. (/home1/user/61916c91a4e81be8/node_modules/markdown-it-anchor/index.js:71:8)",
" at Core.process (/home1/user/61916c91a4e81be8/node_modules/markdown-it/lib/parser_core.js:51:13)",
" at MarkdownIt.parse (/home1/user/61916c91a4e81be8/node_modules/markdown-it/lib/index.js:493:13)",
" at MarkdownIt.render (/home1/user/61916c91a4e81be8/node_modules/markdown-it/lib/index.js:513:36)",
" at decorate (/home1/user/61916c91a4e81be8/node_modules/aglio-theme-olio/lib/main.js:422:44)",
" at Object.exports.render (/home1/user/61916c91a4e81be8/node_modules/aglio-theme-olio/lib/main.js:646:5)",
" at /home1/user/61916c91a4e81be8/node_modules/aglio/lib/main.js:133:20"
```

The above error occurs due to the fact that `markdown-it-anchor` has released `v2.7.0` which introduces some breaking changes.

The following works fine:

```
`-- grunt-aglio@0.4.1
`-- aglio@2.2.1
`-- aglio-theme-olio@1.6.3
`-- markdown-it-anchor@2.5.0
```

`v2.6.0` works fine, too.

But this new `v2.7.0` fails.

```
└─┬ grunt-aglio@0.4.1
└─┬ aglio@2.2.1
└─┬ aglio-theme-olio@1.6.3
└── markdown-it-anchor@2.7.0
```

Some clever people here at `aglio` didn't care enough to set the exact version requirement in its [package.json](https://github.com/danielgtaylor/aglio/blob/olio-theme/package.json#L42).

Please, always use the exact version.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the dependency declaration in package.json at the linked line and compare it with the dependency trees showing markdown-it-anchor 2.5.0, 2.6.0, and 2.7.0. Reproduce the aglio rendering failure, then verify that the dependency is pinned to a compatible exact version and the TypeError no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript, nodejs
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.