hashobject / react-count

Real-time counter button react component
http://react-count.hashobject.com/
MIT License
33 stars 4 forks source link

Error - Unexpected token #2

Open vivekparekh8 opened 7 years ago

vivekparekh8 commented 7 years ago
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.

vivekparekh8 commented 7 years ago

Is anybody using this ?

adarshks commented 6 years ago

@vivekparekh8 did you get any solution for the issue, i am getting the same error.

thisismydesign commented 6 years ago

Same here, it doesn't work.

vivekparekh8 commented 6 years ago

Nope.

thisismydesign commented 6 years ago

Why close the issue then? Project looks legit otherwise, I was glad to notice this open issue.

vivekparekh8 commented 6 years ago

Lets keep it open then.