ampproject / ampproject/rollup-plugin-closure-compiler
[!] (plugin closure-compiler) SyntaxError: Unexpected token (460:13) undefined (460:13)
- Dominant language
- TypeScript
- Stars
- 293
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
Crashes with
```
[!] (plugin closure-compiler) SyntaxError: Unexpected token (460:13)
undefined (460:13)
SyntaxError: Unexpected token (460:13)
at Parser.pp$4.raise (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:2927:15)
at Parser.pp.unexpected (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:698:10)
at Parser.pp.expect (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:692:28)
at Parser.pp$3.parseMethod (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:2713:10)
at Parser.pp$1.parseClassMethod (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:1399:25)
at Parser.pp$1.parseClassElement (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:1388:10)
at Parser.pp$1.parseClass (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:1326:26)
at Parser.pp$1.parseStatement (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:842:19)
at Parser.pp$1.parseTopLevel (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:755:23)
at Parser.parse (/home/moritz/Documents/projektwahl-lit/node_modules/acorn/dist/acorn.js:555:17)
```
## How do we reproduce the issue?
```
git clone https://github.com/projektwahl/projektwahl-lit.git
cd projektwahl-lit
git checkout 68d1c1b28382a127511d1b8a9eb77006426afc92
npm install
npm run localize-build
npm run rollup
```
## Additional information
I think this may be because of the outdated acorn dependency and may simply be fixed by updating it.
Contributor guide
Research direction
Reproduce the failure in the projektwahl-lit checkout using npm install, npm run localize-build, and npm run rollup. Inspect the plugin's dependency declarations and the acorn version involved in parsing the generated class syntax. Done means the reproduction completes without the Unexpected token error and the relevant build checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rollup, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100