0
我是新來的節點,並嘗試按照本教程設置browserify和gulp:https://www.learnhowtoprogram.com/javascript/introduction-to-javascript/using-browserify-with-gulp。請幫助我試過Google搜索,沒有解決方案。Gulp/Browserify錯誤
我一飲而盡文件顯示:
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('jsBrowserify', function() {
return browserify({ entries: ['./js/pingpong-interface.js'] })
.bundle()
.pipe(source('app.js'))
.pipe(gulp.dest('./build/js'));
});
我在終端運行:
gulp jsBrowserify
這應該創建 '構建' 文件夾。
相反,我得到的錯誤:
C:\Users\danrusu\Documents\Coding Docs\projects\pingpong>gulp jsBrowserify
(node:7728) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[11:04:15] Using gulpfile ~\Documents\Coding Docs\projects\pingpong\gulpfile.js
[11:04:15] Starting 'jsBrowserify'...
events.js:160
throw er; // Unhandled 'error' event
^
SyntaxError: Unexpected token