Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Trouble Compiling MDB react not recognising <App /> in ReactDOM.render()

mpcooke3 free asked 7 years ago


Hi this is probably a very noob question as I'm trying bootstrap, react and MDB react for the first time so apologies if that is the case. Once I've downloaded from the site and run npm install I have problems with NPM start.Initially a syntax error on the line"ReactDOM.render(<App/>," in /docs/index.jsSpecifically it's not recognising "<App/>Any idea why? Is it something to do with my environment?I eventually guessed the import of App.js didn't seem to be working correctly I tried editing the babel presets incase this was to do with the ECMAScript versions supported in the transpilation (guess). So, I tried hard coding them to es2017 in the webpack config files. Not sure if that helped or made things worse as I got new errors relating to "..attributes" in various files which I presume is definitely relates to not recognising the modern ECMA syntax.Any help much appreciated, perhaps the <App/> unknown syntax error is nothing to do with babel and ECMAscript version support..

Mikołaj Smoleński staff answered 7 years ago


Please follow my instructions:

  1. Download and install yarn from this page: https://yarnpkg.com/en/docs/install
  2. Then open terminal inside MDB React folder
  3. Type 'yarn' inside folder
  4. After installation type 'yarn start'

Regards


mpcooke3 free commented 7 years ago

Thanks, I got that to work on a fresh install of the MDB react folder. A fresh install also works with npm so I guess I broke something in the original install location as I was trying to set everything up. Many thanks.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags