Reputation: 1286
After upgrading to Visual Studio 2018 15.8.1 (pro) my Gulpfile.js fails to load.
I'm getting the following error message:
Failed to run "C:\...\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
gulp[37688]: src\node_contextify.cc:631: Assertion `args[1]->IsString()' failed.
1: 00007FF6586E82F5
2: 00007FF6586C4156
3: 00007FF6586C4221
4: 00007FF65869A69A
5: 00007FF658CE5EB2
6: 00007FF658CE7008
7: 00007FF658CE636D
8: 00007FF658CE628B
9: 000002A6C5C041C1
Even the simplest Gulpfile.js fails to load:
var gulp = require('gulp');
gulp.task('default', function () {
// place code for your default task here
});
Upvotes: 2
Views: 2141
Reputation: 1286
My solution was:
First, upgrade gulp packages (in packages.json):
"gulp": "3.9.1" > "gulp": "4.0.0"
"gulp-sass": "3.2.1" > "gulp-sass": "4.0.1"
"gulp-uglify": "3.0.0" > "gulp-uglify": "3.0.1"
"gulp-rename": "1.3.0" > "gulp-rename": "1.4.0"
Second, switch from "run-sequence" to gulp.series (see https://fettblog.eu/gulp-4-parallel-and-series/)
Finally, to make sure all my tasks signaled task completion (see Gulp error: The following tasks did not complete: Did you forget to signal async completion?)
The VS community had a few related threads with solutions, neither of which solved my issue:
Upvotes: 4