title: Problems creating a React-node app with npm
body: <p>The instructions are as following:</p>
  <blockquote>
  <p>You are about to start creating a React-node app. Create the file
  package.json using npm commands.</p>
  <p>Make use of the following information:</p>
  <p>The name of the app should be npm_package. The start point will be
  index.js The project should have the following elements of
  dependencies
  - Install the latest version of react
  - Lodash with major version 4 and minor version 17,
  - Redux with Major version 4,
  - Mocha for testing in Dev,
  - Eslint with major version 6 in Dev.</p>
  </blockquote>
  <p>Here is my virtual environment for reference:</p>
  <p><a href="https://i.stack.imgur.com/1sdk1.png" rel="nofollow noreferrer">Virtual Environment</a></p>
  <p>I tried the following commands:</p>
  <pre><code>npm init -y
  
  npm install react --save
  
  npm install lodash@4.17.0 --save
  
  npm install redux@4.0.0 --save
  
  npm install mocha --save-dev
  
  npm install eslint@6.0.0 --save-dev
  </code></pre>
  <p>Correctness is determined by the test file score.sh:</p>
  <pre><code>#!/bin/sh
  PASS=0
  FAIL=0
  
  TEST_1=$(grep -o -e &quot;\&quot;dependencies\&quot;&quot; -e &quot;react&quot; -e &quot;\&quot;redux\&quot;:\s*\&quot;\^4.*\&quot;&quot; -e &quot;\&quot;lodash\&quot;:\s*\&quot;\^4.17.*\&quot;&quot; /projects/challenge/package.json| wc -l)
  
  TEST_2=$(grep -o -e &quot;\&quot;devDependencies\&quot;:\s*{&quot; -e &quot;\&quot;eslint\&quot;:\s*\&quot;^6.*\&quot;&quot; -e &quot;\&quot;mocha\&quot;:\s*&quot; /projects/challenge/package.json| wc -l)
  
  TEST_3=$(find /projects/challenge/node_modules | wc -l)
  
  TEST_4=$(grep -o -e &quot;\&quot;name\&quot;:\s*\&quot;npm_package\&quot;&quot; /projects/challenge/package.json| wc -l)
  
  if [ &quot;$TEST_1&quot; -eq 4 ]
  then ((PASS++))
  fi;
  if [ &quot;$TEST_2&quot; -eq 3 ]
  then ((PASS++))
  fi;
  if [ &quot;$TEST_3&quot; -ge 1 ]
  then ((PASS++))
  fi;
  if [ &quot;$TEST_4&quot; -eq 1 ]
  then ((PASS++))
  fi;
  
  FAIL=$(( 4 - $PASS ))
  
  echo &quot;Test cases executed = 4&quot;;
  echo &quot;PASS = $PASS   FAIL=$FAIL&quot;
  </code></pre>
  <p>Here is my console when I run the tests:</p>
  <blockquote>
  <p>user@workspace5zx0357qxb7p4nvt:/projects/challenge$ bash score.sh Test
  cases executed = 4 PASS = 3   FAIL=1
  user@workspace5zx0357qxb7p4nvt:/projects/challenge$</p>
  </blockquote>
  <p>It does not tell me which test failed (or much of any other information) and therefore I dont know which of my commands I inputted is wrong or am I missing commands</p>