I updated a firebase function to node 16 and I'm getting the following deploy error:
Build failed: ...ve_cv_t' is not a member of 'std'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:38: note: suggested alternative: 'remove_cv'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:38: error: 'remove_cv_t' is not a member of 'std'
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:38: note: suggested alternative: 'remove_cv'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:63: error: '::Perform' has not been declared
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! /www-data-home/.cache/node-gyp/16.18.1/include/node/v8-internal.h:492:63: note: suggested alternative: 'perror'
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! perror
npm ERR! At global scope:
npm ERR! cc1plus: warning: unrecognized command line option '-Wno-cast-function-type'
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
I have already tried removing the cloud function and retrying deploy.
I updated firebase-admin, firebase-functions and @google-cloud/storage packages. I can run the function fine from the shell.