Topic: React npm/yarn start

Wasserman pro asked 6 years ago


I can't run npm/yarn start, there's any specific requirements for the React Pro package? like any specific Node version or anything else?   > mdbreact@4.6.1 start /home/ubuntu/workspace/client/mdb_react/MDB-React-Pro > yarn run sass-compile && concurrently --kill-others "yarn run sass-compile --watch" "yarn run webpack" yarn run v0.15.1 $ node-sass dist/scss -o dist/css error spawn E2BIG at _errnoException (util.js:992:11) at ChildProcess.spawn (internal/child_process.js:323:11) at Object.exports.spawn (child_process.js:502:9) at Promise (/home/ubuntu/.nvm/versions/node/v8.11.3/lib/node_modules/yarnpkg/lib/util/child.js:53:24) at new Promise (<anonymous>) at queue.push (/home/ubuntu/.nvm/versions/node/v8.11.3/lib/node_modules/yarnpkg/lib/util/child.js:52:54) at run (/home/ubuntu/.nvm/versions/node/v8.11.3/lib/node_modules/yarnpkg/lib/util/blocking-queue.js:102:7) at BlockingQueue.maybePushConcurrencyQueue (/home/ubuntu/.nvm/versions/node/v8.11.3/lib/node_modules/yarnpkg/lib/util/blocking-queue.js:117:7) at BlockingQueue.shift (/home/ubuntu/.nvm/versions/node/v8.11.3/lib/node_modules/yarnpkg/lib/util/blocking-queue.js:112:10) at Promise (/home/ubuntu/.nvm/versions/node/v8.11.3/lib/node_modules/yarnpkg/lib/util/blocking-queue.js:62:14) info Visit http://yarnpkg.com/en/docs/cli/run for documentation about this command. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mdbreact@4.6.1 start: `yarn run sass-compile && concurrently --kill-others "yarn run sass-compile --watch" "yarn run webpack"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mdbreact@4.6.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2018-08-03T00_07_04_778Z-debug.log  

Jakub Strebeyko staff answered 6 years ago


Hi there Wasserman, Welcome to the MDB React Support Board! There should be no surprising requirements regarding environment, here are my versions:
node: 8.9.0
yarn: 1.7.0
npm: 5.6.0
What versions are you using? I will try to recreate the issue. With Best Regards, Kuba

Wasserman pro commented 6 years ago

Everything seems to be find I run it on Ubuntu 16 on AWS EC2 instance, and I am using Nginx, when I run yarn start its showing compiled successfully and that project is running on localhost:8080 but i cant access it, if I run any other react app on this port everything seems to be find.. Do I have to do any additional configurations?

Jakub Strebeyko staff commented 6 years ago

Hi there, There is no special configuration required, MDB React works out of the box. The terminal log seems to be throwing errors, and yet you say it gets compiled successfully – could you clarify? The start script in package.json should set up all you need for serving it from local host, way before Nginx or AWS, and it should probably be altered if it gets served some other way. Some other idea that came to head is the node-sass module, as there were issues with in the past. If you have doubts about its performance, consider running node-sass rebuild --force and seeing whether that helped. Let me know, in case of any additional info, too. With Best Regards, Kuba

Wasserman pro commented 6 years ago

Well obviously it's not.. because it didn't work for me and I had to research it for 3 days the worker file, didn't find the window.location, and in order for it to work I needed to add to the file webpack.dev.config.js in devServer :{ historyApiFallback: true, allowedHosts: [ 'my_host.com', 'www.my_host.com' ] } It would be nice to get a note about it.

Jakub Strebeyko staff commented 6 years ago

Hi, Thanks for reaching out! I am sure someone will find the issue and the solution you provided here useful. Cheers! Best, Kuba


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

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