I have an Angular Project and I am trying to use firebase deploy
after building the project. After "hosting: preparing dist directory for upload" it fails with the following error.
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js. Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above. node[38453]: ../src/node_zlib.cc:437:static void node::(anonymous namespace)::ZCtx::Init(const FunctionCallbackInfo &): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed. 1: node::Abort() [/usr/local/bin/node] 2: node::Assert(char const* const () [4]) [/usr/local/bin/node] 3: node::(anonymous namespace)::ZCtx::Init(v8::FunctionCallbackInfo const&) [/usr/local/bin/node] 4: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfo const&)) [/usr/local/bin/node] 5: v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::BuiltinArguments) [/usr/local/bin/node] 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node] 7: 0x3e504a2842fd Abort trap: 6
I checked my version of node (v.9.6.1) and npm (5.6.0). I have tried removing node and npm and reinstalling them, without luck. I have not been able to find the node-tar version.
If anyone could help point me in the right direction I would really appreciate it.
Hey man I just had the issue. After upgrading node and npm to the latest version I figured it was coming from the firebase cli.
I just npm install -g firebase-tools
and then firebase deploy
was working again !