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给占用了,所以install会报错

解决办法:将后端tomcat给停了,然后install就解决了

猜你喜欢

转载自blog.csdn.net/DoChengAoHan/article/details/113110628