react-count
react-count copied to clipboard
Error - Unexpected token
ERROR in ./~/react-count/lib/ViewCount.js
Module parse failed: /Users/vivekparekh/Documents/amazingPortfolio/node_modules/react-count/lib/Count.js Unexpected token (195:17)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (195:17)
at Parser.pp$4.raise (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp.unexpected (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:603:10)
at Parser.pp$3.parseExprAtom (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1822:12)
at Parser.pp$3.parseExprSubscripts (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19)
at Parser.pp$3.parseExprOps (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21)
at Parser.pp$3.parseMaybeConditional (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21)
at Parser.pp$3.parseMaybeAssign (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21)
at Parser.pp$1.parseVar (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1034:28)
at Parser.pp$1.parseVarStatement (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:917:10)
@ ./~/react-count/lib/index.js 1:22-40
Module parse failed: /Users/vivekparekh/Documents/amazingPortfolio/node_modules/react-count/lib/ViewCount.js Unexpected token (16:6)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (16:6)
at Parser.pp$4.raise (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp.unexpected (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:603:10)
at Parser.pp$3.parseExprAtom (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1822:12)
at Parser.pp$3.parseExprSubscripts (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19)
at Parser.pp$3.parseExprOps (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21)
at Parser.pp$3.parseMaybeConditional (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21)
at Parser.pp$3.parseMaybeAssign (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21)
at Parser.pp$3.parseParenAndDistinguishExpression (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1861:32)
at Parser.pp$3.parseExprAtom (/Users/vivekparekh/Documents/amazingPortfolio/node_modules/webpack/node_modules/acorn/dist/acorn.js:1796:19)
@ ./~/react-count/lib/index.js 3:21-43
webpack: Failed to compile.
Usage :
import Count from 'react-count'// Tried var, const with require as well
<Count isViewCounter={true} counterText="views" firebaseHost="https://counter-button.firebaseio.com/" firebaseResourceId='views-counter'/>
webpack.config.js I use - webpack.config.js
Thanks for helping out.
Is anybody using this ?
@vivekparekh8 did you get any solution for the issue, i am getting the same error.
Same here, it doesn't work.
Nope.
Why close the issue then? Project looks legit otherwise, I was glad to notice this open issue.
Lets keep it open then.