You are viewing a single comment's thread from:
RE: Boilerplate For React Applications Using Atlaskit Components And Parcel
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}
Well, it smells like a Babel configuration error. My guess would be a missing configuration for class properties. Check your
.babelrcfile. It should look like this:Ensure that you have the plugin installed:
npm i --save-dev babel-plugin-transform-class-propertiesLet 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.