CorefinityCorefinityDocs
Open the Control PanelControl Panel
Node.js · 4 of 9

corestack_node_packages_update

Change Node.js global packages.

Scope writeAlso exec to reveal secretsRuns as a taskNo secrets returned
On this page

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

Prompt
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

packagesarray of objectsRequired

The full list; a package left out is removed. Up to 20 items.

Fields of each item
namestringRequired

The npm package name, e.g. sass or @angular/cli. Up to 214 characters.

scriptsboolean

Run its install scripts (needs exec when it turns them on).

selectorstring

A version, range or dist-tag (default latest). Up to 255 characters.

revisionintegerRequired

From corestack_node_runtime_get; stale when the row changed since. At least 0.

site_idintegerRequired

The row: the site or one of its environments. At least 1.

updatearray of strings

Names of listed packages to re-resolve now. Up to 20 items.

Example call

tools/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

ReasonWhat to do
switched_offCommands are switched off; nothing can install a changed set.
package_spec_invalidpackage_duplicate, package_limit, package_unresolvable: fix the list.
scripts_memoryThe 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_unavailableThe npm registry did not answer; try again later.
staleruntime_locked, busy: as corestack_node_version_change.
managed_elsewhereAnother 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_argumentsThe 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_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe 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_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT