Node gyp rebuild error handling
Error message:
node-gyp rebuild
CXX(target) Release/obj.target/contextify/src/contextify.o
../src/contextify.cc:50:53: error: too few arguments to function call, single argument 'context' was not specified
target->Set(className, ljsTmpl->GetFunction());
~~~~~~~~~~~~~~~~~~~~ ^
/Users/xxx/Library/Caches/node-gyp/14.15.4/include/node/v8.h:6482:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
../src/contextify.cc:60:74: error: too few arguments to function call, single argument 'context' was not specified
ContextifyContext* ctx = new ContextifyContext(info[0]->ToObject());
~~~~~~~~~~~~~~~~~ ^
/Users/xxx/Library/Caches/node-gyp/14.15.4/include/node/v8.h:2822:44: note: 'ToObject' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
../src/contextify.cc:75:48: error: too few arguments to function call, single argument 'context' was not specified
Local<String> code = info[0]->ToString();
~~~~~~~~~~~~~~~~~ ^
/Users/xxx/Library/Caches/node-gyp/14.15.4/include/node/v8.h:2810:44: note: 'ToString' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
../src/contextify.cc:81:51: error: too few arguments to function call, single argument 'context' was not specified
ScriptOrigin origin(info[1]->ToString());
~~~~~~~~~~~~~~~~~ ^
/Users/xxx/Library/Caches/node-gyp/14.15.4/include/node/v8.h:2810:44: note: 'ToString' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
../src/contextify.cc:124:45: error: too few arguments to function call, single argument 'context' was not specified
constructor.Reset(tmpl->GetFunction());
Solution: switch the node version to node 8.17.0 to solve the above error reports
Mac install to multi version node
1. Download and install
NPM install -g n
2. Download the specified version (followed by the version number)
sudo n 14.15.0
3. Display which versions have been installed
n LS
4. Switch the version used (followed by the version number)
sudo n
view the installed version and switch the version used up and down
Read More:
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- [Solved] NPM Error: gyp: No Xcode or CLT version detected!
- How to Solve Error: Module did not self-register
- [Solved] error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows,
- Node Kubelet Error: node “xxxxx“ not found [How to Solve]
- [app] install and compile libimobililedevice, How to solve the error
- How to Solve Cocoapods Installation Failure
- Error: env [NODE_ENV] is not set (How to Solve)
- How to Solve error C2039: “to_ String “: not a member of” STD “
- How to Solve Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- How to Solve Error: Type mismatch: cannot convert from Object to Car
- How to Solve ceph-deploy Error (Three Errors)
- How to Solve ES error: “illegal_argument_exception”
- How to Solve Cocos creator label text is too many error
- How to Solve Docker failed to initialize Error
- How to Solve Error: Heartbeating to master:7182 failed.
- How to Solve elasticSearch8.1.2 Install Error in Win10
- M1 Computer: How to Solve pod update
- How to Solve Hdsc32 MDK compile error: #29 & #223-D
- How to Solve Webpack CacheGroups Error