gulp serve: Failed to load external module babel/register

#65 · closed · 3 comments

View on GitHub ↗

fcojgodoy

Followed the directions in README.md and I receive this error when I run `gulp`: ``` $ gulp [11:26:22] Failed to load external module babel/register [11:26:22] Requiring external module babel/register ``` It does, however, serve the boilerplate welcome page successfully. And `npm i --save-dev babel` do not fix it. System/Software Information ``` Linux NUC6i5SYK 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux linux { http_parser: '2.8.0', node: '10.1.0', v8: '6.6.346.27-node.6', uv: '1.20.2', zlib: '1.2.11', ares: '1.14.0', modules: '64', nghttp2: '1.29.0', napi: '3', openssl: '1.1.0h', icu: '61.1', unicode: '10.0', cldr: '33.0', tz: '2018c' } npm -v 5.6.0 $ gulp -v [00:27:27] Failed to load external module @babel/register [00:27:27] Requiring external module babel-register [00:27:27] CLI version 2.0.1 [00:27:27] Local version 3.9.1 ``` I attempted a clean install, and retraced every step for a second time in a new directory and I am still encountering the same error. I must note that I am new to Babel, so I have no idea whether or not this has any consequence.

Comments

GrahamWilsdon

I found using [gulp-browserify](https://www.npmjs.com/package/gulp-browserify) worked. In gulp.js / scripts task ``` .pipe(babel({ presets: ['env'] })) .pipe(browserify()) .pipe(uglify()) ```

fcojgodoy

This do not remove the error: `npm i --save gulp-browserify` `import browserify from 'gulp-browserify'` ``` .pipe(babel({ presets: ['env'] })) .pipe(browserify()) .pipe(uglify()) ```

carloscuesta

Hey! Completely missed these issue, I'll close this as I've stopped maintaining this for a while now. Thanks for using this! ❤️