grunt
grunt copied to clipboard
Calling grunt fails on linux server
While trying to run grunt on a new machine using a file that I have seen work before I get this error:
grunt[41447]: ../src/node_contextify.cc:676:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[1]->IsString()' failed.
1: 0xa04200 node::Abort() [grunt]
2: 0xa0427e [grunt]
3: 0x9f5b93 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [grunt]
4: 0xbe6715 [grunt]
5: 0xbe6d1f [grunt]
6: 0xbe7346 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [grunt]
7: 0x1401319 [grunt]
Aborted (core dumped)
This is similar to #1660, but since I have never had any prior version of node or npm on this server, I'm at a lost to how to fix this. If a lower version of node, or a specific version of natives is required, it would be nice to have this in the documentation.
Node: 14.15.5 (also failed on 10.19.0) Npm: 6.14.11
Gulp had a similar issue with node 10, see this: https://github.com/nodejs/node/issues/19786 Since node 8.x is EOL and even node 10.x will be EOL on Apr 30th, downgrading is not the option you want.
I'm on grunt 1.3.0 and node 12.x and I don't have this problem. If I had to make a guess, one of the grunt plugins you're using calls graceful-fs 3.x -> internals -> bad node_contextify.cc. graceful-fs 4.x is patched. Try npm ls graceful-fs
and see if that helps you.