You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing the latest version (npm install [email protected]) seems like the RunScript function is missing entirely.
Error reported from compiler:
error C2039: 'RunScript': is not a member of 'Napi::Env'
Sample code:
Napi::Value execute_code(const Napi::CallbackInfo& info)
{
Napi::Env env = info.Env();
// If there is no info passed, do not execute the code.
if (info.Length() < 1)
return Napi::Boolean::New(env, false);
try
{
Napi::Value result = env.RunScript(info[0].As<Napi::String>());
}
catch(std::exception&)
{
// will be denied by further return anyway.
}
return Napi::Boolean::New(info.Env(), false);
}
The downloaded version via npm does not seem to reflect the same version as it is here on github.
From github:
How come the npm version is mismatching so much even tho it says that they are the same "version"?
Those who are affected by this issue, you are free to install the actual latest version using npm install @h1x4dev/node-addon-api (include in gyp changes to require('@h1x4dev/node-addon-api').include) until the issue is resolved here.
The text was updated successfully, but these errors were encountered:
The change (#616) landed on master in December. The most recent release (2.0.0) was at the end of November so there is no current release that contains RunScript. Discussion about the next release is in #646.
Hello,
When installing the latest version (
npm install [email protected]
) seems like the RunScript function is missing entirely.Error reported from compiler:
Sample code:
The docs do say that it exists: https://github.com/nodejs/node-addon-api/blob/master/doc/env.md#runscript
The Napi header says it exists: https://github.com/nodejs/node-addon-api/blob/master/napi.h#L188
HOWEVER
The downloaded version via npm does not seem to reflect the same version as it is here on github.
From github:
How come the npm version is mismatching so much even tho it says that they are the same "version"?
Those who are affected by this issue, you are free to install the actual latest version using
npm install @h1x4dev/node-addon-api
(include in gyp changes torequire('@h1x4dev/node-addon-api').include
) until the issue is resolved here.The text was updated successfully, but these errors were encountered: