npm install遇到问题
来源:13-2 Mediasoup Demo的布署

邓丹俊
2025-04-16
error npm info using npm@10.8.2
1646 error npm info using node@v18.20.8
1646 error npm verbose title npm install
1646 error npm verbose argv “install” “–force” “–cache” “/home/predator/cache” “–prefer-offline” “true” “–prefer-online” “false” “–offline” “false” “–no-progress” “–no-save” “–no-audit” “–include” “dev” “–include” “peer” “–include” “optional” “–no-package-lock-only” "–no-dry-run"
1646 error npm verbose logfile logs-max:10 dir:/home/predator/cache/_logs/2025-04-16T06_59_08_674Z-
1646 error npm verbose logfile /home/predator/cache/_logs/2025-04-16T06_59_08_674Z-debug-0.log
1646 error npm warn using --force Recommended protections disabled.
1646 error npm verbose reify failed optional dependency /home/predator/cache/_cacache/tmp/git-clonevbvHyP/node_modules/fsevents
1646 error WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
1646 error WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
1646 error WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
1646 error npm-scripts.mjs [31m[ERROR] [prepare][0m executeCmd() failed, exiting: Error: Command failed: “python3” -m invoke -r worker flatc
1646 error npm verbose stack Error: command failed
1646 error npm verbose stack at promiseSpawn (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:22:22)
1646 error npm verbose stack at spawnWithShell (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:124:10)
1646 error npm verbose stack at promiseSpawn (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:12:12)
1646 error npm verbose stack at runScriptPkg (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:77:13)
1646 error npm verbose stack at runScript (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:12:10)
1646 error npm verbose stack at async Install.exec (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/lib/commands/install.js:163:9)
1646 error npm verbose stack at async Npm.exec (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/lib/npm.js:207:9)
1646 error npm verbose stack at async module.exports (/root/.nvm/versions/node/v18.20.8/lib/node_modules/npm/lib/cli/entry.js:74:5)
1646 error npm verbose pkgid mediasoup@3.15.7
1646 error npm error code 1
1646 error npm error path /home/predator/cache/_cacache/tmp/git-clonevbvHyP
1646 error npm error command failed
1646 error npm error command sh -c node npm-scripts.mjs prepare
1646 error npm verbose cwd /home/predator/cache/_cacache/tmp/git-clonevbvHyP
1646 error npm verbose os Linux 6.8.0-57-generic
1646 error npm verbose node v18.20.8
1646 error npm verbose npm v10.8.2
1646 error npm verbose exit 1
1646 error npm verbose code 1
1646 error npm error A complete log of this run can be found in: /home/predator/cache/_logs/2025-04-16T06_59_08_674Z-debug-0.log
1647 silly unfinished npm timer reify 1744786711322
1648 silly unfinished npm timer reify:unpack 1744786739901
1649 silly unfinished npm timer reifyNode:node_modules/mediasoup 1744786739904
1650 verbose cwd /home/predator/mediasoup-demo/server
1651 verbose os Linux 6.8.0-57-generic
1652 verbose node v18.20.8
1653 verbose npm v10.8.2
1654 verbose exit 1
1655 verbose code 1
1656 error A complete log of this run can be found in: /home/predator/cache/_logs/2025-04-16T06_58_30_557Z-debug-0.log
我将执行命令python3 -m invoke -r worker flatc 执行显示
2回答
-
李超
2025-04-17
你可以按照视频手动执行一下npm 看看用国内的源能不能安装,如果不行的话就说明国内的源包不全
022025-04-20 -
李超
2025-04-16
你没有外网吧,你这个命令会调用npm 安装包,没有外网装不了
042025-04-17
相似问题