# Why do my ComfyUI custom nodes say IMPORT FAILED after a restart or a move?

> A node folder being there doesn't mean the node loads. IMPORT FAILED means the node's code ran and something it needs was missing: a Python package, or a system library such as libGL.so.1 that lives on the machine, not in the folder. Installing the node again won't fix it; installing what the error names will.

Canonical page: https://renest.ai/answers/nodes-missing-after-move

<h2 id="import-failed">"IMPORT FAILED": the folder is there, the node didn't load</h2>

<p>IMPORT FAILED means ComfyUI found the node's folder, ran its code, and the code stopped
with an error. A node that was never downloaded doesn't say this. It simply isn't listed.
ComfyUI carries on starting without the node, so the app opens normally and the node only
shows up red when a workflow uses it.</p>

<p>Three things have to be present for a custom node to load, and copying or cloning the
folder brings back only the first:</p>

<ul>
  <li>the node's folder in <code>custom_nodes</code>;</li>
  <li>the Python packages it installed, inside the Python that runs ComfyUI;</li>
  <li>the system libraries those packages load, which belong to the operating system.</li>
</ul>

<h2 id="read-the-log">Find the line in the start-up log that says why</h2>

<p>The reason is in ComfyUI's start-up log, a few lines above the import timing list where
the node is marked <code>(IMPORT FAILED)</code>. Look for <code>Cannot import … module for
custom node</code> and the traceback right after it. In ComfyUI-Manager you can also filter
the custom node list by <em>Import Failed</em>. The last line of the traceback falls into
one of two kinds:</p>

<ul>
  <li><code>ModuleNotFoundError: No module named '…'</code>: a Python package is missing.</li>
  <li><code>…: cannot open shared object file: No such file or directory</code>, for example
  <code>ImportError: libGL.so.1: cannot open shared object file</code>: a system library is
  missing.</li>
</ul>

<p>Any other error is usually a bug in the node itself, or a version clash with another
node. Check the node's issue tracker with the exact line.</p>

<h2 id="python-package">"No module named …": install the package into ComfyUI's own Python</h2>

<p>Install the node's requirements with the Python that starts ComfyUI, not whichever
<code>pip</code> is first on your path. On Linux with a virtual environment:</p>

<pre>$ /path/to/venv/bin/python -m pip install -r custom_nodes/&lt;node&gt;/requirements.txt</pre>

<p>On Windows Portable, from the <code>ComfyUI_windows_portable</code> folder:</p>

<pre>$ python_embeded\python.exe -s -m pip install -r ComfyUI\custom_nodes\&lt;node&gt;\requirements.txt</pre>

<p>Then restart ComfyUI. If the package installs and the node still fails, read the new last
line. One fix often reveals the next missing piece.</p>

<h2 id="system-library">"libGL.so.1" or "libMagickWand": install the system library, not the node</h2>

<p>A missing <code>.so</code> file is part of the operating system, so reinstalling the node
or its Python packages won't bring it back. Slim container images used on cloud GPUs often
leave these out. Install the package that provides it. On Debian or Ubuntu images:</p>

<pre>$ apt-get update &amp;&amp; apt-get install -y libgl1
$ apt-get install -y libmagickwand-dev</pre>

<p><code>libgl1</code> provides <code>libGL.so.1</code>, which OpenCV loads. On older Ubuntu
releases the package is called <code>libgl1-mesa-glx</code>. ImageMagick-based nodes need
<code>libMagickWand</code>. If OpenCV is the only thing asking for libGL, replacing
<code>opencv-python</code> with <code>opencv-python-headless</code> also works, but other
nodes may install the full version again.</p>

<h2 id="after-restart">Nodes are red again after every pod restart</h2>

<p>On RunPod and similar services, anything outside the persistent volume is reset when the
pod stops. The volume is usually mounted at <code>/workspace</code>. That reset takes with
it every system library you installed with <code>apt-get</code>, and any Python packages
that were installed outside the volume. The node folders survive on the volume, so the next
start shows the folders and fails to import them. That is why ComfyUI-Manager asks you to
install the same nodes again after each restart.</p>

<p>Ways to make it stick:</p>

<ul>
  <li>Use a container image that already contains the system libraries your nodes need.
  Whatever is in the image is there again after every stop.</li>
  <li>Keep ComfyUI's Python environment on the volume, so its packages survive too. It still
  breaks if the next pod uses a different image or GPU generation.</li>
  <li>Or reinstall the missing pieces from a start-up script each time the pod starts. Some
  people keep the library files on the volume and link them back in at start-up; that
  works, but it breaks quietly when the image changes.</li>
</ul>

<p>Why a volume keeps the files and still loses the working setup is covered in
<a href="/answers/network-volume-breaks-on-new-pod">Network volume, new pod, still
broken</a>.</p>

<h2 id="manager-installed">ComfyUI-Manager says the node is installed, and it's still red</h2>

<p>ComfyUI-Manager can show a node as installed because its folder is there. That says
nothing about whether it imports. Check the start-up log as above. If it shows IMPORT FAILED, the
fix is the missing package or library, and pressing Install again won't change it. Two
other causes:</p>

<ul>
  <li>The packages went into a different Python, for example a system Python or another
  conda environment, so ComfyUI never sees them.</li>
  <li>The node loads, but the workflow asks for a node type the installed version no longer
  has. That is a version problem, covered in
  <a href="/answers/red-nodes-empty-models">Red nodes and empty model lists</a>.</li>
</ul>

<h2 id="renest">What Renest does about missing packages and libraries</h2>

<p>A nest is packed from a run where the nodes loaded, and it handles each of the three layers
in the only way that layer can travel:</p>

<ul>
  <li><strong>Node folders:</strong> carried as files, at the commit that ran
  (<a href="/docs/pinned-commits-not-latest">why pinned, not latest</a>). Every file
  is checked against its checksum when it comes back.</li>
  <li><strong>Python packages:</strong> the exact versions that resolved, installed again
  for the new machine. Before the model files download, the restore asks whether that
  list can be installed on this machine. If the answer is a clear no, it stops there.</li>
  <li><strong>System libraries:</strong> no nest can carry them, since they belong to the
  operating system. The nest records which ones the working run actually loaded. Before the
  download, the restore offers to install any that this machine lacks (it asks first; <code>--yes</code> skips the question). Without the rights to install, it prints the command and carries on.</li>
</ul>

<p>After it starts ComfyUI, the restore reads the start-up log. It names any custom node
that failed to import because a system library is missing, even though the app itself came
up. Fixes for those messages are in
<a href="/docs/troubleshooting#libs">If a restore stops</a>. The
<a href="/docs/base-image">Renest base image</a> already includes the system libraries
image and fine-tuning workflows commonly load.</p>

<p>What it doesn't do: a node that fails on a plain Python error, a bug in the node itself,
is not flagged as a missing library, because it isn't one. And a restore doesn't run again
by itself each time a pod restarts.</p>

<h2 id="not-renest">When Renest isn't the answer</h2>

<ul>
  <li><strong>The node never loaded on any machine.</strong> Renest only carries a setup
  that already worked. Fix the first install using the steps above.</li>
  <li><strong>You restart the same pod with the same image</strong> and only need a few
  libraries back. A custom image or a start-up script is simpler.</li>
  <li><strong>The error is in the node's own code.</strong> Report it to the node's
  author.</li>
</ul>

<p>Related: <a href="/answers/errors-after-gpu-change">Errors after changing GPU</a> ·
<a href="/answers/when-is-a-move-finished">When is a moved setup actually
working?</a></p>
