title: Trying to run babel : "cannot find module @babel/core"
body: <p>I'm trying to set up a build environment to explore react.
  My build process uses gulp.</p>
  
  <p>I installed packages like this: </p>
  
  <blockquote>
    <p>npm install --save-dev gulp-babel@7 babel-core babel-preset-env</p>
  </blockquote>
  
  <p>After discovering that I needed to install something related to babel and react I also ran: </p>
  
  <blockquote>
    <p>npm install --save-dev @babel/preset-react</p>
  </blockquote>
  
  <p>My .babelrc has this: </p>
  
  <blockquote>
    <p>{   "presets": ["@babel/preset-react"] }</p>
  </blockquote>
  
  <p>My gulpfile has this: </p>
  
  <pre><code>gulp.task('scripts', function() {
      return gulp.src(['./src/js/main.js' ])
          .pipe(babel({
              presets : ['@babel/preset/react']
          }))
          .pipe(concat('test.js'))
          .pipe(gulp.dest('./js'))
          .pipe(uglify())
          .pipe(rename('test.min.js'))
          .pipe(gulp.dest('./js')) ;
  });
  </code></pre>
  
  <p>When I run 'gulp scripts' I get this: </p>
  
  <pre><code>[22:51:14] Using gulpfile ~/play/learning-react-2/gulpfile.js
  [22:51:14] Starting 'scripts'...
  [22:51:14] 'scripts' errored after 59 ms
  [22:51:14] Error in plugin "gulp-babel"
  Message:
      Cannot find module '@babel/core' (While processing preset: "/home/bob/play/learning-react-2/node_modules/@babel/preset-react/lib/index.js")
  </code></pre>
  
  <p>I deleted babel-core from node_modules, and reinstalled it using the command: </p>
  
  <blockquote>
    <p>npm install --save-dev @babel/core</p>
  </blockquote>
  
  <p>If I look at the contents of node_modules, I see these packages related to babel:</p>
  
  <blockquote>
    <p>babel-code-frame/<br>
    babel-helper-builder-binary-assignment-operator-visitor/
    babel-helper-call-delegate/<br>
    babel-helper-define-map/<br>
    babel-helper-explode-assignable-expression/<br>
    babel-helper-function-name/<br>
    babel-helper-get-function-arity/<br>
    babel-helper-hoist-variables/<br>
    babel-helper-optimise-call-expression/<br>
    babel-helper-regex/<br>
    babel-helper-remap-async-to-generator/<br>
    babel-helper-replace-supers/<br>
    babel-messages/<br>
    babel-plugin-check-es2015-constants/<br>
    babel-plugin-syntax-async-functions/<br>
    babel-plugin-syntax-exponentiation-operator/<br>
    babel-plugin-syntax-trailing-function-commas/<br>
    babel-plugin-transform-async-to-generator/<br>
    babel-plugin-transform-es2015-arrow-functions/<br>
    babel-plugin-transform-es2015-block-scoped-functions/<br>
    babel-plugin-transform-es2015-block-scoping/<br>
    babel-plugin-transform-es2015-classes/<br>
    babel-plugin-transform-es2015-computed-properties/<br>
    babel-plugin-transform-es2015-destructuring/<br>
    babel-plugin-transform-es2015-duplicate-keys/<br>
    babel-plugin-transform-es2015-for-of/<br>
    babel-plugin-transform-es2015-function-name/<br>
    babel-plugin-transform-es2015-literals/<br>
    babel-plugin-transform-es2015-modules-amd/<br>
    babel-plugin-transform-es2015-modules-commonjs/<br>
    babel-plugin-transform-es2015-modules-systemjs/<br>
    babel-plugin-transform-es2015-modules-umd/<br>
    babel-plugin-transform-es2015-object-super/<br>
    babel-plugin-transform-es2015-parameters/<br>
    babel-plugin-transform-es2015-shorthand-properties/<br>
    babel-plugin-transform-es2015-spread/<br>
    babel-plugin-transform-es2015-sticky-regex/<br>
    babel-plugin-transform-es2015-template-literals/<br>
    babel-plugin-transform-es2015-typeof-symbol/<br>
    babel-plugin-transform-es2015-unicode-regex/<br>
    babel-plugin-transform-exponentiation-operator/<br>
    babel-plugin-transform-regenerator/<br>
    babel-plugin-transform-strict-mode/<br>
    babel-preset-env/<br>
    babel-runtime/<br>
    babel-template/<br>
    babel-traverse/
    babel-types/</p>
  </blockquote>
  
  <p>I'm guessing that at least one of them is "babel core"</p>
  
  <p>So... how do I actually run babel from gulp? How do I run it at all?</p>