-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
I keep getting this error when trying to bundle a library with rollup. The library depends on route-parser.
Error loading C:\Users\download\code\modules\swkit\node_modules\route-parser\lib\route\compiled-grammar.js: Invalid labeled declaration (163:8) in C:\Users\download\code\modules\swkit\node_modules\route-parser\lib\route\compiled-grammar.js
SyntaxError: Error loading C:\Users\download\code\modules\swkit\node_modules\route-parser\lib\route\compiled-grammar.js: Invalid labeled declaration (163:8) in C:\Users\download\code\modules\swkit\node_modules\route-parser\lib\route\compiled-grammar.js
at Parser.pp$4.raise (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:2488:13)
at Parser.pp$1.parseLabeledStatement (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1017:10)
at Parser.pp$1.parseStatement (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:779:19)
at Parser.pp$1.parseBlock (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1040:23)
at Parser.pp$3.parseFunctionBody (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:2362:22)
at Parser.pp$1.parseFunction (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1132:8)
at Parser.pp$3.parseExprAtom (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1999:17)
at Parser.pp$3.parseExprSubscripts (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1872:19)
at Parser.pp$3.parseMaybeUnary (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1849:17)
at Parser.pp$3.parseExprOps (C:\Users\download\code\modules\swkit\node_modules\acorn\dist\acorn.js:1791:19)
Type rollup --help for help, or visit https://github.com/rollup/rollup/wiki
I can't tell what's actually wrong in the compiled-grammar.js file at 163:8 but the whole file looks a bit strange. I assume because it was created by a grammar generator.
Is it violating some syntactic rules that the rollup parser enforces? Maybe I should open an issue with jison. Any thoughts?
Metadata
Metadata
Assignees
Labels
No labels