ampproject / ampproject/amp-toolbox
Node example on README doesn't work
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Tried the example provide to test locally with Node and the code provided returns error:
```
linter.MetaCharsetIsFirst(context).then(console.log);
^
TypeError: linter.MetaCharsetIsFirst is not a function
at Object. (/Users/ibrahim.souza/Projetos/webstories-linter/linter.js:12:8)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
```
Only through local build I got the result expected to evaluate our code. Since we are a small team, if this worked as documented would be better for our team non-technical run the commands without the hassle of build this repo and navigate through folders.
Node version: **12.18.0**
Npm version: **6.14.4**
System: **Mac OSX 10.15.5**
@ampproject/toolbox-linter: **2.5.12**
Contributor guide
Research direction
Start with the Node example in the README and compare its exported API with the @ampproject/toolbox-linter package at version 2.5.12; reproduce with Node 12.18.0. Done means the documented command runs without a local build and returns the expected lint result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100