You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
// gulpfile.esm.jsimport{src,dest}from'gulp';// errors with SyntaxError: The requested module 'file:///User/home/v4/node_modules/gulp/index.js' does not provide an export named 'src'// errors with SyntaxError: The requested module 'file:///User/home/v4/node_modules/gulp/index.js' does not provide an export named 'dest'
I've found that is because gulp does the following:
functionGulp(){Undertaker.call(this);// Bind the functions for destructuringthis.watch=this.watch.bind(this);this.task=this.task.bind(this);this.series=this.series.bind(this);this.parallel=this.parallel.bind(this);this.registry=this.registry.bind(this);this.tree=this.tree.bind(this);this.lastRun=this.lastRun.bind(this);}util.inherits(Gulp,Undertaker);Gulp.prototype.src=vfs.src;Gulp.prototype.dest=vfs.dest;Gulp.prototype.symlink=vfs.symlink;module.exports=newGulp();
If the following lines are added to the constructor, the imports work successfully: