Topic: npm start for the mdb-react-pro-4.1.0 is failing!

dd free asked 6 years ago


Hello Guys :)I just got the MDB-React-Pro-4.1.0 then went through the npm install and it worked perfectly. Now to start I went through npm start but I am getting the following error:
ERROR in ./docs/index.js Module build failed: SyntaxError: C:/Users/Rodwan/Desktop/cruzVermelhaProject/project/mdbPro2/MDB React Pro/docs/index.js: Unexpected token (12:2) 10 | 11 | ReactDOM.render( > 12 | <App />, | ^ 13 | document.getElementById(\\\'root\\\') 14 | ); 15 | @ multi (webpack)-dev-server/client?http://localhost:8081 ./docs/index.js Child html-webpack-plugin for \\\"index.html\\\": 1 asset [0] ./node_modules/html-webpack-plugin/lib/loader.js!./public/index.html 1.98 kB {0} [built] [1] ./node_modules/lodash/lodash.js 477 kB {0} [built] [2] (webpack)/buildin/global.js 487 bytes {0} [built] [3] (webpack)/buildin/module.js 500 bytes {0} [built] webpack: Failed to compile.
Could you please help me to solve itThank you in advance!

Jakub Strebeyko staff answered 6 years ago


Thanks awolfard for being so helpful. Closing.

wtek01 pro answered 6 years ago


Thank you its ok. but I thought have also the menu component bar at the top with facebook conexión profile included also in the template given the price paid ??

Jakub Strebeyko staff commented 6 years ago

Hi there wtek01, Not sure what you mean by that - all components, including bars, panels, sidenavs, navbars etc. are included in our MDB React PRO package. What are you missing? With Best Regards, Kuba

wtek01 pro answered 6 years ago


Hello, I have the same errors, if you can helps please. Thank you

awolfard pro commented 6 years ago

In the SelectPage.js change the </Option> ending tags (3 of them) into an </SelectOption>

dd free commented 6 years ago

Thank you very much :))) It worked for me!

awolfard pro answered 6 years ago


Hi, I had the same. I had to add a .babelrc file to get it working { “presets” : [“es2015”, “react”], “plugins”: [ [“transform-class-properties”, { “spec”: true }], [“transform-object-rest-spread”, {}] ] } Regards, Arnoud  

dd free commented 6 years ago

Thank you awolfard :)))) I tried your solution but I am getting this error now: ERROR in ./docs/pages/pro/SelectPage.js Module build failed: SyntaxError: C:/Users/Rodwan/Desktop/cruzVermelhaProject/project/mdbPro2/MDB React Pro/docs/pages/pro/SelectPage.js: Expected corresponding JSX closing tag for (100:57) 98 | 99 | > 100 | Choose your option | ^ 101 | Option nr 1 102 | Option nr 2 103 | Option nr 3 @ ./docs/Routes.js 139:18-51 @ ./docs/App.js @ ./docs/index.js @ multi (webpack)-dev-server/client?http://localhost:8085 ./docs/index.js I can't really understand what's going on as I am a very beginner in react and ecmascript:(

awolfard pro commented 6 years ago

In the SelectPage.js change the </Option> ending tags (3 of them) into an </SelectOption>

dd free answered 6 years ago


Thank you Jakub I repeated the same process and I am getting the same error I will post the whole output, maybe it says more.
 
> webpack-dev-server --config ./webpack.dev.config.js --watch --open Project is running at http://localhost:8083/
webpack output is served from / 404s will fallback to /index.html [BABEL] Note: The code generator has deoptimised the styling of "C:/Users/Rodwan/Desktop/cruzVermelhaProject/toDelete/MDB React Pro/node_modules/lodash/lodash.js" as it exceeds the max of "500KB". webpack: wait until bundle finished: / Hash: a58bc5648ee3cdbd2573 Version: webpack 3.10.0 Time: 8568ms Asset Size Chunks Chunk Names bundle.js 359 kB 0 [emitted] [big] main index.html 1.64 kB [emitted] [2] multi (webpack)-dev-server/client?http://localhost:8083 ./docs/index.js 40 bytes {0} [built] [3] (webpack)-dev-server/client?http://localhost:8083 7.91 kB {0} [built] [4] ./node_modules/url/url.js 22.8 kB {0} [built] [7] ./node_modules/url/util.js 315 bytes {0} [built] [8] ./node_modules/querystring-es3/index.js 126 bytes {0} [built] [11] ./node_modules/strip-ansi/index.js 161 bytes {0} [built] [12] ./node_modules/ansi-regex/index.js 139 bytes {0} [built] [13] ./node_modules/loglevel/lib/loglevel.js 7.9 kB {0} [built] [14] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built] [15] ./node_modules/sockjs-client/dist/sockjs.js 216 kB {0} [built] [16] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built] [18] ./node_modules/html-entities/index.js 230 bytes {0} [built] [21] (webpack)/hot nonrecursive ^./log$ 170 bytes {0} [built] [23] (webpack)/hot/emitter.js 74 bytes {0} [built] [25] ./docs/index.js 290 bytes {0} [built] [failed] [1 error] + 11 hidden modules ERROR in ./docs/index.js Module build failed: SyntaxError: C:/Users/Rodwan/Desktop/cruzVermelhaProject/toDelete/MDB React Pro/docs/index.js: Unexpected token (12:2) 10 | 11 | ReactDOM.render( > 12 | <App />, | ^ 13 | document.getElementById('root') 14 | ); 15 | @ multi (webpack)-dev-server/client?http://localhost:8083 ./docs/index.js Child html-webpack-plugin for "index.html": 1 asset [0] ./node_modules/html-webpack-plugin/lib/loader.js!./public/index.html 1.98 kB {0} [built] [1] ./node_modules/lodash/lodash.js 477 kB {0} [built] [2] (webpack)/buildin/global.js 487 bytes {0} [built] [3] (webpack)/buildin/module.js 500 bytes {0} [built] webpack: Failed to compile.

Jakub Strebeyko staff answered 6 years ago


Hi there dd, Thanks for contributing to our React forum! It looks like the .jsx syntax does not get recognized - if you haven't fiddled around with your package.json nor .babelrc this case seems highly unusual. The easiest solution seems to re-follow the same way you got to the good results, that is to download the package again, install dependencies and see what's up. Don't forget to let us know whether it helped! With Best Regards, Kuba

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: Yes
  • Provided link: No
Tags