You are viewing a single comment's thread from:

RE: Boilerplate For React Applications Using Atlaskit Components And Parcel

in #utopian-io8 years ago (edited)

Do you know how to solve this? I'm running into this with npm run build

> [email protected] build /app
> parcel build src/index.html --public-url ./

⏳  Building...

⏳  Building index.html...
⏳  Building index.js...
⏳  Building MainRouter.js...
🚨  /app/src/modules/MainRouter.js:26:23: Unexpected token (26:23)
  24 |   }
  25 | 
> 26 |   appWithPersistentNav = () => (props) => (
     |                        ^
  27 |     <App
  28 |       onNavResize={this.onNavResize}
  29 |       {...props}
Sort:  

Well, it smells like a Babel configuration error​. My guess would be a missing configuration for class properties. Check your .babelrc file. It should look like this:

{
  "presets": ["react-app"],
  "plugins": ["transform-class-properties"]
}

Ensure that you have the plugin installed:

npm i --save-dev babel-plugin-transform-class-properties

Let me know if this fixed it for you. If not I have to look at your code. Good luck mate.

Thanks, this fixed it for me. I'm back in business. Parcel is voodoo

Did you find out what the issue has been?

Ok, I'm going to get to the bottom of this this week. Promise.

No worries, I just posted the answer to help you out. So, there is no rush. Just let me know when I can help you further to fix the error.

Actually, I may take you up on that. I have need to finish something this week, so cheers to getting it done.

Honestly, I haven't had the chance to investigate.

Coin Marketplace

STEEM 0.08
TRX 0.29
JST 0.035
BTC 109149.67
ETH 3823.92
USDT 1.00
SBD 0.58