title: npm ERR! missing script: build in REACT DEPLOYED IN HEROKU
body: <p>I'm trying to deploy a project in Heroku with <code>create-react-app</code> using Node as my server and MongoDB for my database but I'm getting an error. this is my first to deploy a project with React. I have 2 <code>package.json</code> files. One for <code>create-react-app</code> the other is for my node server.</p>
  
  <p>What I did was:</p>
  
  <ol>
  <li>run the build in React,</li>
  <li>commit, </li>
  <li>create a Heroku app using <code>heroku create -b https://github.com/mars/create-react-app-buildpack.git</code> </li>
  <li>I pushed it to Heroku master.</li>
  </ol>
  
  <p>Here are the logs.</p>
  
  <pre><code>Counting objects: 203, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (187/187), done.
  Writing objects: 100% (203/203), 191.40 KiB | 5.80 MiB/s, done.
  Total 203 (delta 91), reused 0 (delta 0)
  remote: Compressing source files... done.
  remote: Building source:
  remote: 
  remote: -----&gt; React.js (create-react-app) multi app detected
  remote: -----&gt; Configure create-react-app build environment
  remote:        Using `NODE_ENV=development`
  remote: =====&gt; Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
  remote: =====&gt; Detected Framework: Multipack
  remote: =====&gt; Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
  remote: =====&gt; Detected Framework: Node.js
  remote: 
  remote: -----&gt; Creating runtime environment
  remote:        
  remote:        NPM_CONFIG_LOGLEVEL=error
  remote:        NPM_CONFIG_PRODUCTION=false
  remote:        NODE_VERBOSE=false
  remote:        NODE_ENV=development
  remote:        NODE_MODULES_CACHE=true
  remote: 
  remote: -----&gt; Installing binaries
  remote:        engines.node (package.json):  unspecified
  remote:        engines.npm (package.json):   unspecified (use default)
  remote:        
  remote:        Resolving node version 8.x...
  remote:        Downloading and installing node 8.11.4...
  remote:        Using default npm version: 5.6.0
  remote: 
  remote: -----&gt; Restoring cache
  remote:        Skipping cache restore (not-found)
  remote: 
  remote: -----&gt; Building dependencies
  remote:        Installing node modules (package.json + package-lock)
  remote:        added 85 packages in 3.391s
  remote: 
  remote: -----&gt; Caching build
  remote:        Clearing previous node cache
  remote:        Saving 2 cacheDirectories (default):
  remote:        - node_modules
  remote:        - bower_components (nothing to cache)
  remote: 
  remote: -----&gt; Pruning devDependencies
  remote:        Skipping because NODE_ENV is not 'production'
  remote: 
  remote: -----&gt; Build succeeded!
  remote: =====&gt; Downloading Buildpack: https://github.com/mars/create-react-app-inner-buildpack.git
  remote: =====&gt; Detected Framework: React.js (create-react-app)
  remote:        Writing `static.json` to support create-react-app
  remote:        Enabling runtime environment variables
  remote: npm ERR! missing script: build
  remote: 
  remote: npm ERR! A complete log of this run can be found in:
  remote: npm ERR!     /app/.npm/_logs/2018-09-04T05_56_24_845Z-debug.log
  remote:  !     Push rejected, failed to compile React.js (create-react-app) multi app.
  remote: 
  remote:  !     Push failed
  remote: Verifying deploy...
  remote: 
  remote: !   Push rejected to klikie.
  remote: 
  To https://git.heroku.com/klikie.git
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'https://git.heroku.com/klikie.git
  </code></pre>
  
  <p>this is my <strong>package.json</strong> in create-react-app</p>
  
  <pre><code>{
    "name": "klikme",
    "version": "0.1.0",
    "private": true,
    "proxy": "http://localhost:8000/",
    "dependencies": {
      "react": "^16.4.2",
      "react-dom": "^16.4.2",
      "react-router-dom": "^4.3.1",
      "react-scripts": "1.1.5",
      "styled-components": "^3.4.5"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test --env=jsdom",
      "eject": "react-scripts eject"
    }
  }
  </code></pre>
  
  <p>this is for my server dep:</p>
  
  <pre><code>{
    "name": "klikme",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      "dev": "nodemon server.js"
    },
    "keywords": [],
    "author": "",
    "license": "ISC",
    "dependencies": {
      "body-parser": "^1.18.3",
      "express": "^4.16.3",
      "mongoose": "^5.2.12",
      "morgan": "^1.9.0"
    }
  }
  </code></pre>
  
  <p>I added this in my server too since its in the documentation: </p>
  
  <pre><code>app.use(express.static(path.join(__dirname, 'client/build')));
  app.get('/', function(req, res) {
    res.sendFile(path.join(__dirname, 'client/build', 'index.html'));
  });
  </code></pre>