0

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.

  • Can you explain how you got to this error? – GabrielNexT Dec 23 '22 at 13:41
  • I have a node 10 function that I'm trying to update to node 16. I updated a few packages and made the necessary changes in the code so that it compiles, but when I try to deploy I get that error. – Matias Vergara Dec 23 '22 at 14:04
  • Have you tried updating the npm node-gyp like mentioned [here](https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md), check this [document](https://www.npmjs.com/package/node-gyp?activeTab=versions) & stackoverflow [thread](https://stackoverflow.com/questions/67241196/error-no-template-named-remove-cv-t-in-namespace-std-did-you-mean-remove) – Sathi Aiswarya Dec 26 '22 at 13:11

0 Answers0