admin管理员组

文章数量:1393092

Problem: I'm running n8n in a Docker container and trying to install opencv4nodejs. Every time I try, I get the following error:

npm error Tracker "idealTree" already exists

Also, there’s an issue related to the library directory being missing:

npm error Error: library dir does not exist: /home/node/node_modules/opencv-build/opencv/build/lib

And after switching Node.js versions, I get:

Error relocating /root/.nvm/versions/node/v18.20.7/bin/node: fcntl64: symbol not found

I'm using Node.js version v20.18.3 inside the container. Is it possible that this is causing compatibility problems with opencv4nodejs?

This is the log file:

/ # cat /root/.npm/_logs/2025-03-13T21_52_28_097Z-debug-0.log
0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:/usr/local/lib/node_modules/npm/npmrc
4 silly config load:file:/.npmrc
5 silly config load:file:/root/.npmrc
6 silly config load:file:/usr/local/etc/npmrc
7 verbose title npm install opencv4nodejs
8 verbose argv "install" "opencv4nodejs"
9 verbose logfile logs-max:10 dir:/root/.npm/_logs/2025-03-13T21_52_28_097Z-
10 verbose logfile /root/.npm/_logs/2025-03-13T21_52_28_097Z-debug-0.log
11 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
12 silly logfile start cleaning logs, removing 1 files
13 silly logfile done cleaning log files
14 silly idealTree buildDeps
15 verbose stack Error: Tracker "idealTree" already exists
15 verbose stack     at #onError (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js:84:11)
15 verbose stack     at Arborist.addTracker (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js:26:20)
15 verbose stack     at #buildDeps (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:753:10)
15 verbose stack     at Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:181:28)
15 verbose stack     at async Promise.all (index 1)
15 verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
15 verbose stack     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)
15 verbose stack     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
15 verbose stack     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5)
16 error Tracker "idealTree" already exists
17 silly unfinished npm timer reify 1741902748798
18 silly unfinished npm timer reify:loadTrees 1741902748810
19 silly unfinished npm timer idealTree:buildDeps 1741902748831
20 verbose cwd /
21 verbose os Linux 5.15.167.4-microsoft-standard-WSL2
22 verbose node v20.18.3
23 verbose npm  v10.8.2
24 verbose exit 1
25 verbose code 1
26 error A complete log of this run can be found in: /root/.npm/_logs/2025-03-13T21_52_28_097Z-debug-0.log

What I’ve tried:

  • I've tried clearing the npm cache, removing node_modules and package-lock.json.
  • I switched Node.js versions using nvm, but still facing issues.
  • I also reinstalled dependencies like curl and node-gyp.

本文标签: javascriptUnable to install opencv4nodejs in n8n Docker quotidealTree already existsquotStack Overflow