gulp Requiring external module babel-register

It sounds like you need to run npm install --save babel-require. You can read more about it here.

Edit: Just to explain a bit better, the purpose of babel-require is to compile required packages with babel on the fly. In this case I'm assuming it's meant to be compiling ES6 javascript syntax back to ES5 syntax, because it's failing on the newer ES6 import syntax.

I'm not sure how babel ended up in your gulp pipeline there, but it's explicitly being required by something in /home/gcfabri/Workspace/sportfitness/gulpfile.babel.js. I wouldn't recommend removing it, but just so you have an idea of what's happening.

I hope installing that dependancy helps.

参考:

https://stackoverflow.com/questions/35349078/angular-fullstack-requiring-external-module-babel-register

原文地址:https://www.cnblogs.com/parkdifferent/p/11930306.html