在 docker 上尝试 npm install 后遇到问题。现在,当我在本地主机 PC 上尝试 npm install 时,即使没有 docker,我的 npm install 也从未完成。日志文件中包含有关 fsevents 模块错误的信息。在 npm install 之前需要几秒钟。现在还来不及完成。
这是日志:
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\username\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js1 info using [email protected]
2 info using [email protected]
3 silly config load:file:C:\Users\username\AppData\Roaming\npm\node_modules\npm\npmrc
4 silly config load:file:C:\Users\username\Documents\Project-NASA\server\.npmrc
5 silly config load:file:C:\Users\username\.npmrc
6 silly config load:file:C:\Users\username\AppData\Roaming\npm\etc\npmrc
7 verbose title npm install
8 verbose argv "install" "--prefix" "server"
9 verbose logfile logs-max:10 dir:C:\Users\username\AppData\Local\npm-cache\_logs\2024-06-28T21_11_23_384Z-
10 verbose logfile C:\Users\username\AppData\Local\npm-cache\_logs\2024-06-28T21_11_23_384Z-debug-0.log
11 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
12 silly logfile start cleaning logs, removing 2 files
13 silly logfile error removing log file C:\Users\username\AppData\Local\npm-cache\_logs\2024-06-28T21_11_11_684Z-debug-0.log [Error: EPERM: operation not permitted, lstat 'C:\Users\username\AppData\Local\npm-cache\_logs\2024-06-28T21_11_11_684Z-debug-0.log'] {
13 silly logfile errno: -4048,
13 silly logfile code: 'EPERM',
13 silly logfile syscall: 'lstat',
13 silly logfile path: 'C:\\Users\\username\\AppData\\Local\\npm-cache\\_logs\\2024-06-28T21_11_11_684Z-debug-0.log'
13 silly logfile }
14 silly logfile done cleaning log files
15 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
16 silly idealTree buildDeps
17 silly placeDep ROOT [email protected] REPLACE for: [email protected] want: file:..
18 silly reify mark retired [
18 silly reify 'C:\\Users\\username\\Documents\\Project-NASA\\server\\node_modules\\fsevents'
18 silly reify ]
19 silly reify moves {
19 silly reify 'C:\\Users\\username\\Documents\\Project-NASA\\server\\node_modules\\fsevents': 'C:\\Users\\username\\Documents\\Project-NASA\\server\\node_modules\\.fsevents-T0cSxVM9'
19 silly reify }
20 silly audit bulk request {
{ packages }
20 silly audit }
21 verbose reify failed optional dependency C:\Users\username\Documents\Project-NASA\server\node_modules\fsevents
22 silly reify mark deleted [
22 silly reify 'C:\\Users\\username\\Documents\\Project-NASA\\server\\node_modules\\fsevents'
22 silly reify ]
23 info run [email protected] install .. npm run install-server && npm run install-client
24 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 359ms
25 silly audit report {
25 silly audit report ws: [
25 silly audit report {
25 silly audit report id: 1097616,
25 silly audit report url: 'https://github.com/advisories/GHSA-3h5v-q93c-6h6q',
25 silly audit report title: 'ws affected by a DoS when handling a request with many HTTP headers',
25 silly audit report severity: 'high',
25 silly audit report vulnerable_versions: '>=7.0.0 <7.5.10',
25 silly audit report cwe: [Array],
25 silly audit report cvss: [Object]
25 silly audit report }
25 silly audit report ]
25 silly audit report }
26 silly packumentCache corgi:ws cache-miss
27 http fetch GET 200 ws 16ms (cache hit)
28 silly packumentCache corgi:ws set size:189667 disposed:false
29 silly packumentCache corgi:@pm2%2fagent cache-miss
30 silly packumentCache corgi:@pm2%2fjs-api cache-miss
31 http fetch GET 200 @pm2%2fjs-api 8ms (cache hit)
32 silly packumentCache corgi:@pm2%2fjs-api set size:94969 disposed:false
33 http fetch GET 200 @pm2%2fagent 13ms (cache hit)
34 silly packumentCache corgi:@pm2%2fagent set size:68391 disposed:false
35 silly packumentCache corgi:pm2 cache-miss
36 http fetch GET 200 pm2 7ms (cache hit)
37 silly packumentCache corgi:pm2 set size:403394 disposed:false
我尝试将配置注册表更改为 http 而不是 https。 删除 Dockerfile。 更改 npm 版本。 删除node_modules文件夹。 将 node.exe 添加到防病毒软件的排除项中。
使用过的命令: 国家管理委员会 和 npm 重建
请问有什么帮助吗?
这里看来你的系统已经安装了NodeJS,请在CMD中查看
node -v