node.jsgulproots-sage

gulp watch issue in sage 8.5.1


I'm currently working on a site that is using Sage 8.5.1.

I've done all of the following:

  1. Install gulp and Bower globally with npm install -g gulp bower
  2. Navigate to the theme directory and run npm install
  3. Run bower install

But when I run gulp watch, I get the following issue:

gulp watch[8188]: ../src/node_contextify.cc:633:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
 1: 0x10003b125 node::Abort() [/usr/local/bin/node]
 2: 0x10003a183 node::AddEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [/usr/local/bin/node]
 3: 0x100064bc1 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: 0x10023122f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
 5: 0x1002303cb v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 6: 0x10022fde7 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 7: 0x22e57615be3d 
Abort trap: 6

Any suggestions?


Solution

  • Per a bug filed against ionic (same error, different build utility), this seems to be a problem with some combination of module dependencies. Their solution:

    rm -rf node_modules
    rm package-lock.json
    npm cache clean --force
    npm install
    

    After I ran this, I found that most of my module dependencies had changed, many of them minor or build updates.