Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!] (plugin rename-rollup) SyntaxError: Unexpected token (8:12) #6

Open
luckylooke opened this issue Apr 11, 2020 · 2 comments
Open

Comments

@luckylooke
Copy link

Hello,
first of all, thank you for sharing.
I am trying to remake my ui library from git submodule to npm package, I dicided to use rollup and I am trying to implement this setup. BUT I end on this issue:

rollup --config ./rollup.config.js --watch
rollup v1.32.1
bundles ./src/index.js → dist...
[!] (plugin rename-rollup) SyntaxError: Unexpected token (8:12)
undefined (8:12)
SyntaxError: Unexpected token (8:12)
    at Object.pp$4.raise (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2840:15)
    at Object.pp.unexpected (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:689:10)
    at Object.pp$3.parseIdent (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2791:12)
    at Object.pp$3.parsePropertyName (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2597:107)
    at Object.pp$3.parseProperty (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2524:10)
    at Object.pp$3.parseObj (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2478:23)
    at Object.pp$3.parseExprAtom (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2239:19)
    at Object.parseExprAtom (myProject/node_modules/rollup/dist/shared/node-entry.js:11811:30)
    at Object.pp$3.parseExprSubscripts (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2092:21)
    at Object.pp$3.parseMaybeUnary (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2069:19)
    at Object.pp$3.parseExprOps (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:2013:21)
    at Object.pp$3.parseMaybeConditional (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:1996:21)
    at Object.pp$3.parseMaybeAssign (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:1969:21)
    at Object.pp$3.parseExpression (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:1935:21)
    at Object.pp$1.parseReturnStatement (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:1005:33)
    at Object.pp$1.parseStatement (myProject/node_modules/rollup/node_modules/acorn/dist/acorn.js:835:37)

Could anybody give me some hint please? Thanks :)

@luckylooke
Copy link
Author

This PR seems to be related: #5

@aarongranick-okta
Copy link

Are you using ES6 classes? Acorn cannot parse class fields. '@babel/plugin-proposal-class-properties may help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants