npm installがエラーを報告します!

シナリオ:新しいプロジェクトをプルダウンするときに、installを実行して、次のエラーを報告します。

npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path F:\yyzsofwer\xxxx.js
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'F:\yyzsofwer\invtSVN\IPQS\IPQS\node_modules\.xxxx.js'
npm ERR!  [OperationalError: EPERM: operation not permitted, unlink 'F:\yyzsofwer\invtSVN\IPQS\IPQS\xxxx.js'] {
    
    
npm ERR!   cause: [Error: EPERM: operation not permitted, unlink 'F:\yyzsofwer\xxxx.js'] {
    
    
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'unlink',
npm ERR!     path: 'F:\\yyzsofwerxxxx.js'
npm ERR!   },
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'F:\\xxxx.js',
npm ERR!   parent: 'IPQS'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Program Files (x86)\nodejs\npm-cache\_logs\2021-01-25T05_52_30_965Z-debug.log


理由:私の理由は、バックエンドのTomcatが8080を占有しているため、インストールでエラーが報告されるためです。

解決策:バックエンドのTomcatを停止してから、インストールします

おすすめ

転載: blog.csdn.net/DoChengAoHan/article/details/113110628