Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp fails on node_contextify.cc:631 assertion args[1]->IsString() #2171

Closed
kking124 opened this issue May 2, 2018 · 1 comment
Closed

Comments

@kking124
Copy link

kking124 commented May 2, 2018

What were you expecting to happen?

gulp to run (specifically, compile some handlebars templates)

What actually happened?

gulp crashed

> gulp templates
gulp[12108]: src\node_contextify.cc:631: Assertion `args[1]->IsString()' failed.
 1: node::DecodeWrite
 2: node::DecodeWrite
 3: uv_loop_fork
 4: v8::internal::interpreter::BytecodeDecoder::Decode
 5: v8::internal::RegExpImpl::Exec
 6: v8::internal::RegExpImpl::Exec
 7: v8::internal::RegExpImpl::Exec
 8: 000000BB0FF04281
Process finished with exit code 134

Please post a sample of your gulpfile (preferably reduced to just the bit that's not working)

var gulp = require('gulp');
var templates = require('./gulp/templates');
gulp.task('templates', templates);
var gulp = require('gulp');
var path = require('path');
var handlebars = require('gulp-handlebars');
var wrap = require('gulp-wrap');
var declare = require('gulp-declare');
var concat = require('gulp-concat');
var merge = require('merge-stream');

module.exports = function() {

    //process partials
    var partials = gulp.src('./templates/partials/**/*.hbs')

        .pipe(handlebars())

        .pipe(wrap('Handlebars.registerPartial(<%=  processPartialName(file.relative) %>, Handlebars.template(<%= contents %>) );',{},{
            imports:{
                "processPartialName": function(fileName) {

                    return JSON.stringify(path.basename(fileName, '.js'));

                }
            }
        }));

    var templates = gulp.src(['./templates/**/*.hbs', '!./templates/partials/**/*.hbs'])

        .pipe(handlebars())

        .pipe(wrap('Handlebars.template(<%= contents %>)'))

        .pipe(declare({

            namespace: 'app.templates',

            noRedeclare: true

        }));

    return merge(partials, templates)

        .pipe(concat('combined.js'))

        .pipe(gulp.dest('./public/assets/templates/'))

}

What version of gulp are you using?

> gulp -v
[13:34:34] CLI version 3.9.1
[13:34:34] Local version 3.9.1

What versions of npm and node are you using?

> npm -v
5.6.0
> node -v
v10.0.0

OS: Windows 10 April 2018 Update

I suspect this is related to issue #2162 but the included fix did not work. The problem began to occur after upgrade to April 2018

@phated
Copy link
Member

phated commented May 2, 2018

You've already linked the duplicate. That is the only solution.

@phated phated closed this as completed May 2, 2018
@gulpjs gulpjs locked and limited conversation to collaborators May 2, 2018
@gulpjs gulpjs deleted a comment from kking124 Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants