Help Center/ Meeting/ Client SDK Reference/ FAQs/ [Electron] What Do I Do If the Error Message "no template named'remove_cv_t\" Is Displayed When I Compile the .node File on macOS?
Updated on 2022-07-11 GMT+08:00

[Electron] What Do I Do If the Error Message "no template named'remove_cv_t\" Is Displayed When I Compile the .node File on macOS?

Customer Case

A customer has integrated the Electron SDK. When the .node file is compiled, the message "no template named'remove_cv_t\" is displayed.

Cause Analysis

The cause is that remove_cv_t is supported from C++14, but binding.gyp that Node.js depends on requires C++11.

Solution

It is recommended that the Node.js version match the Electron version. Download Node.js of the version recommended by the Electron version from the official website of Node.js. For details about the mapping, see https://www.electronjs.org/docs/latest/tutorial/electron-timelines. If the problem persists, use either of the following methods to resolve the issue:

1. In the error file v8-internal.h, change remove_cv_t to remove_cv.

2. In the binding.gyp file, change -std=c++11 to -std=c++14 in the OTHER_CPLUSPLUSFLAGS configuration item.