Cannot install community nodes!

Problem:
Cannot install community nodes at all.

Things I’ve tried:

  • Tried installing via container shell
  • Did multiple new installs
  • Tried various env variables
  • Tried declaring permissions via ACL
  • Tried changing UID/GID
  • Multiple Different Nodes
  • Tried creating and declaring home/user and community node storages
  • Tried installing via a custom app (straight from docker)
  • Allocated all necessary permissions, even tried running as privileged
  • Researched and troubleshooted with ChatGPT, the fourms, and google for hours trying to fix
    -etc

What is the error message (if any)?

When trying to install via shell I get: npm error Your cache folder contains root-owned files, due to a bug in
npm error previous versions of npm which has since been addressed.
npm error
npm error To permanently fix this problem, please run:
npm error sudo chown -R 568:568 “/.npm”
npm error Log files were not written due to an error writing to the directory: /.npm/_logs
npm error You can rerun the command with --loglevel=verbose to see the logs in your terminal

When trying to install via GUI I get: Error loading package “n8n-nodes-discord-trigger” :Command failed: npm init -y Exit prior to config file resolving cause A system error occurred: uv_os_homedir returned ENOENT (no such file or directory)

I’ve also looked through verbose. Most of it seems to be permission errors but I cannot figure out why this would be. I can post here if you need but its long. I have been able to get different error messages over the hours (on instances ive since deleted), but all stems back to here.

Please share your workflow

(does not apply to singular workflow)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version: 1.81.2 (latest version available)
  • **Database (default: SQLite): default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): Truenas scale built in docker app
  • **Operating system: Truenas Scale (Electric Eel)

From a quick glance it looks like npm itself is broken. Specifically, the caching system has corrupted permissions.

First, I’d recommend deleting and reinstalling it, including the cache (sometimes this is not deleted in reinstalls)
Second, I’d use pnpm in the future

Thank you for your response. I’ve already reinstalled multiple times, and each time the cache should have been clean as they are running in docker containers. Nevertheless, I did try clearing it, but unfortunately it did not work. I tired to install pnpm but it failed with the same error ( using npm ). Any other idea what it could be?

Just to confirm: You are able to run n8n?

The only issue is trying to install community nodes?

Yes, you are correct.

Have you tried changing where the cache folder resides? You can try creating a new folder and then

export npm_config_cache=/path/to/cache

I imagine you did, as this was the first result I got.

Are there any guides for installing npm in TrueNas? I’m unfamiliar with them. Is there some sort of package manager you could use like Snap?

I did play around with cache stuff, but I will try this again just to be sure when I get some time.

I haven’t looked much into installing npm on TrueNAS, I’ll try to research that tomorrow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.