title: npm run dev script error
body: <p>I'm trying to follow a tutorial and i continue running into an error with has to do with the script. </p>
  
  <p>I've restarted the tutorial to try to make sure I didn't miss anything however I've hit the same road block. I'm on a mac in pycharm.</p>
  
  <p>So far in the tutorial (its off of udemy)we have installed the webpack-cli, webpack, and created a test.js file to see if importing and exporting modules work. </p>
  
  <p>test.js</p>
  
  <pre><code>console.log('imported module');
  
  export default
  </code></pre>
  
  <p>Index.js</p>
  
  <pre><code>// Global app controller
  
  import num from './test';
  
  console.log(`I imported ${num} from another module`);
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "forkify",
    "version": "1.0.0",
    "description": "forkify project",
    "main": "index.js",
    "dependencies": {},
    "devDependencies": {
      "webpack": "^4.11.1",
      "webpack-cli": "^3.0.2"
    },
    "scripts": {
      "dev": "webpack"
    },
    "author": "Christopher Maltez",
    "license": "ISC"
  }
  </code></pre>
  
  <p>webpack.config.js</p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
      entry: './src/js/index.js',
      output: {
        path: path.resolve(__dirname,'dist/js'),
        filename: 'bundle.js'
      },
      mode: 'development'
  };
  </code></pre>
  
  <p>and here is the error log.</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
  2 info using npm@6.1.0
  3 info using node@v8.11.2
  4 verbose run-script [ 'predev', 'dev', 'postdev' ]
  5 info lifecycle forkify@1.0.0~predev: forkify@1.0.0
  6 info lifecycle forkify@1.0.0~dev: forkify@1.0.0
  7 verbose lifecycle forkify@1.0.0~dev: unsafe-perm in lifecycle true
  8 verbose lifecycle forkify@1.0.0~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/chrismaltez/Desktop/pycharmprojects/UDEMY/JS-Udemy/Section 9: forkify/9-forkify-starter/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/chrismaltez/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/chrismaltez/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/mysql/bin/:/usr/local/mysql/bin/
  9 verbose lifecycle forkify@1.0.0~dev: CWD: /Users/chrismaltez/Desktop/pycharmprojects/UDEMY/JS-Udemy/Section 9: forkify/9-forkify-starter
  10 silly lifecycle forkify@1.0.0~dev: Args: [ '-c', 'webpack' ]
  11 info lifecycle forkify@1.0.0~dev: Failed to exec dev script
  12 verbose stack Error: forkify@1.0.0 dev: `webpack`
  12 verbose stack spawn ENOENT
  12 verbose stack     at ChildProcess.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
  12 verbose stack     at emitTwo (events.js:126:13)
  12 verbose stack     at ChildProcess.emit (events.js:214:7)
  12 verbose stack     at maybeClose (internal/child_process.js:925:16)
  12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  13 verbose pkgid forkify@1.0.0
  14 verbose cwd /Users/chrismaltez/Desktop/pycharmprojects/UDEMY/JS-Udemy/Section 9: forkify/9-forkify-starter
  15 verbose Darwin 17.5.0
  16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
  17 verbose node v8.11.2
  18 verbose npm  v6.1.0
  19 error file sh
  20 error code ELIFECYCLE
  21 error errno ENOENT
  22 error syscall spawn
  23 error forkify@1.0.0 dev: `webpack`
  23 error spawn ENOENT
  24 error Failed at the forkify@1.0.0 dev script.
  24 error This is probably not a problem with npm. There is likely additional logging output above.
  25 verbose exit [ 1, true ]
  </code></pre>
  
  <p>Here is a snippet of my file structure where I think is the problem. 
  <a href="https://i.stack.imgur.com/nfyzx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nfyzx.png" alt="file structure"></a></p>