corestack_ node_ packages_ update
Change Node.js global packages.
When to use it
Set a row's global npm packages at its revision. Send the full list: a package left out is removed, a new line or a changed selector is pinned to the version it resolves to now, kept lines keep their pins, and update re-resolves the named ones. Public npm registry only. Turning install scripts on for a package that does not run them now also needs exec. A refused install keeps the previous set and the task ends work_failed with npm's message.
Ask for it
Using the Corefinity MCP server, call corestack_node_packages_update with site_id 4211, revision 7, packages [{"name":"sass","selector":"latest"},{"name":"sharp","selector":"0.34","scripts":true}]. (Change Node.js global packages.) Tell me what it returned.Inputs
The full list; a package left out is removed. Up to 20 items.
Fields of each item
The npm package name, e.g. sass or @angular/cli. Up to 214 characters.
Run its install scripts (needs exec when it turns them on).
A version, range or dist-tag (default latest). Up to 255 characters.
From corestack_node_runtime_get; stale when the row changed since. At least 0.
The row: the site or one of its environments. At least 1.
Names of listed packages to re-resolve now. Up to 20 items.
Example call
{
"name": "corestack_node_packages_update",
"arguments": {
"site_id": 4211,
"revision": 7,
"packages": [
{"name": "sass", "selector": "latest"},
{"name": "sharp", "selector": "0.34", "scripts": true}
]
}
}If it is refused
| Reason | What to do |
|---|---|
switched_off | Commands are switched off; nothing can install a changed set. |
package_spec_invalid | package_duplicate, package_limit, package_unresolvable: fix the list. |
scripts_memory | The list turns install scripts on for a package that has an install script, and the environment's command line has less memory than install scripts need (details: packages, cli_memory_mib, min_cli_memory_mib). Nothing is saved. Send the list with scripts off for those packages, or change the environment to a larger size first. A package that already runs its scripts there is never refused. For example, {"name": "bcrypt", "scripts": true} on a 224 MiB command line: "bcrypt runs an install script, and this environment's command line has 224 MiB of memory; install scripts need at least 512 MiB. Turn install scripts off for bcrypt, or choose a larger size." |
registry_unavailable | The npm registry did not answer; try again later. |
stale | runtime_locked, busy: as corestack_node_version_change. |
managed_elsewhere | Another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done. |
invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |