https://github.com/nodejs/node/blob/938e11882b96e19b443477571455088baaa054d8/test/node-api/test_async/test_async.cc#L24 See this function ,it calls `napi_throw_type_error`. In the document:https://nodejs.org/docs/latest/api/n-api.html#n_api_napi_create_async_work, executor is called in another thread, so it can't call any napi function.