title: npm start command give ELIFECYCLE error with errno 1
body: <p>I've run npm install on mac using sudo and it installed with 0 vulnerabilities.</p>
  
  <p>When I give npm start, I'm getting error code ELIFECYCLE with errno 1.</p>
  
  <p>I'm able to run the same in windows without getting an error.</p>
  
  <p>Below is the log of the run</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
  2 info using npm@6.4.1
  3 info using node@v11.3.0
  4 verbose run-script [ 'prestart', 'start', 'poststart' ]
  5 info lifecycle tanaaz@0.1.0~prestart: tanaaz@0.1.0
  6 info lifecycle tanaaz@0.1.0~start: tanaaz@0.1.0
  7 verbose lifecycle tanaaz@0.1.0~start: unsafe-perm in lifecycle true
  8 verbose lifecycle tanaaz@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Files/Taannaz/Taannaz Web/tanaaz-master/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  9 verbose lifecycle tanaaz@0.1.0~start: CWD: /Files/Taannaz/Taannaz Web/tanaaz-master
  10 silly lifecycle tanaaz@0.1.0~start: Args: [ '-c', 'node scripts/start.js' ]
  11 silly lifecycle tanaaz@0.1.0~start: Returned: code: 1  signal: null
  12 info lifecycle tanaaz@0.1.0~start: Failed to exec start script
  13 verbose stack Error: tanaaz@0.1.0 start: `node scripts/start.js`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
  13 verbose stack     at EventEmitter.emit (events.js:182:13)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:182:13)
  13 verbose stack     at maybeClose (internal/child_process.js:978:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
  14 verbose pkgid tanaaz@0.1.0
  15 verbose cwd /Files/Taannaz/Taannaz Web/tanaaz-master
  16 verbose Darwin 18.2.0
  17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
  18 verbose node v11.3.0
  19 verbose npm  v6.4.1
  20 error code ELIFECYCLE
  21 error errno 1
  22 error tanaaz@0.1.0 start: `node scripts/start.js`
  22 error Exit status 1
  23 error Failed at the tanaaz@0.1.0 start script.
  23 error This is probably not a problem with npm. There is likely additional logging output above.
  24 verbose exit [ 1, true ]
  </code></pre>
  
  <p>Pls suggest the necessary.</p>
  
  <p>I am sharing the lines in start.js as well below. Again this works completely fine in Windows 10 and throws me the error mentioned in MacOS Mojave</p>
  
  <pre><code>'use strict';
  
  // Do this as the first thing so that any code reading it knows the right env.
  process.env.BABEL_ENV = 'development';
  process.env.NODE_ENV = 'development';
  
  // Makes the script crash on unhandled rejections instead of silently
  // ignoring them. In the future, promise rejections that are not handled will
  // terminate the Node.js process with a non-zero exit code.
  process.on('unhandledRejection', err =&gt; {
    throw err;
  });
  
  // Ensure environment variables are read.
  require('../config/env');
  
  const fs = require('fs');
  const chalk = require('chalk');
  const webpack = require('webpack');
  const WebpackDevServer = require('webpack-dev-server');
  const clearConsole = require('react-dev-utils/clearConsole');
  const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
  const {
    choosePort,
    createCompiler,
    prepareProxy,
    prepareUrls,
  } = require('react-dev-utils/WebpackDevServerUtils');
  const openBrowser = require('react-dev-utils/openBrowser');
  const paths = require('../config/paths');
  const config = require('../config/webpack.config.dev');
  const createDevServerConfig = require('../config/webpackDevServer.config');
  
  const useYarn = fs.existsSync(paths.yarnLockFile);
  const isInteractive = process.stdout.isTTY;
  
  // Warn and crash if required files are missing
  if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
    process.exit(1);
  }
  
  // Tools like Cloud9 rely on this.
  const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
  const HOST = process.env.HOST || '0.0.0.0';
  
  if (process.env.HOST) {
    console.log(
      chalk.cyan(
        `Attempting to bind to HOST environment variable: ${chalk.yellow(
          chalk.bold(process.env.HOST)
        )}`
      )
    );
    console.log(
      `If this was unintentional, check that you haven't mistakenly set it in your shell.`
    );
    console.log(`Learn more here: ${chalk.yellow('https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration')}`);
    console.log();
  }
  
  // We attempt to use the default port but if it is busy, we offer the user to
  // run on a different port. `choosePort()` Promise resolves to the next free port.
  choosePort(HOST, DEFAULT_PORT)
    .then(port =&gt; {
      if (port == null) {
        // We have not found a port.
        return;
      }
      const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
      const appName = require(paths.appPackageJson).name;
      const urls = prepareUrls(protocol, HOST, port);
      // Create a webpack compiler that is configured with custom messages.
      const compiler = createCompiler(webpack, config, appName, urls, useYarn);
      // Load proxy config
      const proxySetting = require(paths.appPackageJson).proxy;
      const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
      // Serve webpack assets generated by the compiler over a web sever.
      const serverConfig = createDevServerConfig(
        proxyConfig,
        urls.lanUrlForConfig
      );
      const devServer = new WebpackDevServer(compiler, serverConfig);
      // Launch WebpackDevServer.
      devServer.listen(port, HOST, err =&gt; {
        if (err) {
          return console.log(err);
        }
        if (isInteractive) {
          clearConsole();
        }
        console.log(chalk.cyan('Starting the development server...\n'));
        openBrowser(urls.localUrlForBrowser);
      });
  
      ['SIGINT', 'SIGTERM'].forEach(function(sig) {
        process.on(sig, function() {
          devServer.close();
          process.exit();
        });
      });
    })
    .catch(err =&gt; {
      if (err &amp;&amp; err.message) {
        console.log(err.message);
      }
      process.exit(1);
    });
  </code></pre>