[英]I'm trying to run gulp serve and says 'No gulpfile found'. I'm new with Nodejs. I don't know if I the gulp path is wrong
I think that maybe the path of gulp is wrong. 我认为也许大吃一惊的道路是错误的。 But i'm not sure.
但是我不确定。
import gulp from 'gulp';
import browserSync from 'browser-sync';
import plumber from 'gulp-plumber';
import sass from 'gulp-sass';
import sourcemaps from 'gulp-sourcemaps';
import autoprefixer from 'gulp-autoprefixer';
import cleanCSS from 'gulp-clean-css';
import browserify from 'browserify';
import babelify from 'babelify';
import source from 'vinyl-source-stream';
import buffer from 'vinyl-buffer';
import jsmin from 'gulp-jsmin';
import imagemin from 'gulp-imagemin';
import wpPot from 'gulp-wp-pot';
import sort from 'gulp-sort';
const reload = browserSync.reload;
reloadFiles = ['./script.js', './style.css', './**/*.php'];
proxyOptions = {
proxy: 'localhost/dakar/',
notify: false
};
gulp.task('server', () => browserSync.init(reloadFiles, proxyOptions));
I expect to run the gulp server, but the output is [12:07:16] No gulpfile found 我希望运行gulp服务器,但输出为[12:07:16]找不到gulpfile
Probably your file name isn't gulpfile.js. 您的文件名可能不是gulpfile.js。
Also look into this thread if the above didn't solve your problem: No gulpfile found 如果以上方法不能解决您的问题,也请查看此线程: 找不到gulpfile
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.