gruntjs / grunt-cli

Grunt's command line interface.
http://gruntjs.com/
MIT License
706 stars 248 forks source link

Grunt crashing in Node.js v10 #118

Closed vinitkumar closed 6 years ago

vinitkumar commented 6 years ago

I am not able to run Grunt at all on the latest node.js v10.0.0

project [$!] is 📦 v2.0.2 via ⬢ v10.0.0 on 🐳 v18.05.0-ce-rc1 via 🐍 system 
➜ ./node_modules/grunt-cli/bin/grunt             
grunt[29375]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::InternalCallbackScope::~InternalCallbackScope() [/usr/local/bin/node]
 3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
 5: 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: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 7: 0x33c44868427d
[1]    29375 abort      ./node_modules/grunt-cli/bin/grunt

Node.js Version: 10.0.0 NPM Version: 6.0.0

vinitkumar commented 6 years ago

@shama Is anyone fixing this issue? What can I do to help?

shama commented 6 years ago

@vinitkumar I'm not able to repro this issue. Grunt works for me with Node 10 and npm 6:

screen shot 2018-05-21 at 11 48 21 am

Maybe try reinstalling Node.js?

vinitkumar commented 6 years ago

@shama It works for me too now. It happened with 10.0.0 but not with 10.1.0. Thanks for your time 👍

ivaskad commented 6 years ago

image

Same problem here Fixed by downgading node to 9.5.0

shama commented 6 years ago

FWIW, this error should probably be reported to Node itself.

vinitkumar commented 6 years ago

Upgrade Node to latest and it would work. It did the trick for me.

On Fri, 8 Jun 2018, 18:57 Dominik Ivaška, notifications@github.com wrote:

[image: image] https://user-images.githubusercontent.com/11831491/41160562-697358d6-6b30-11e8-8b04-f29da8df9504.png

Same problem here

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gruntjs/grunt-cli/issues/118#issuecomment-395760417, or mute the thread https://github.com/notifications/unsubscribe-auth/AAg0TtqkZ-R5CjLRf0mVS8Sba2wOmS9nks5t6nvNgaJpZM4TvR_k .

cullylarson commented 5 years ago

If it's still helpful to anyone, I resolved this by removing node_modules and package-lock.json and then doing a fresh npm install. Just removing node_modules didn't work. There was probably some weird dependency pinned in package-lock.json.