最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

在运行lerna bootstrap时执行错误操作npm

运维笔记admin13浏览0评论

在运行lerna bootstrap时执行错误操作npm

在运行lerna bootstrap时执行错误操作npm

每当我运行lerna bootstrap --hoistlerna bootstrap时,我的Windows机器上都会出现以下错误。

我已经尝试过npm login并强制清除了npm缓存,但是似乎没有任何作用。

npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'E:\Devfolio_work\ethglobal-devfolio\node_modules\.staging\typescript-ebd093cf\lib\typescriptServices.js'
npm ERR!  { [Error: EPERM: operation not permitted, unlink 'E:\Devfolio_work\ethglobal-devfolio\node_modules\.staging\typescript-ebd093cf\lib\typescriptServices.js']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'E:\Devfolio_work\ethglobal-devfolio\node_modules\.staging\typescript-ebd093cf\lib\typescriptServices.js'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path:
npm ERR!       'E:\\Devfolio_work\\ethglobal-devfolio\\node_modules\\.staging\\typescript-ebd093cf\\lib\\typescriptServices.js' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, unlink \'E:\\Devfolio_work\\ethglobal-devfolio\\node_modules\\.staging\\typescript-ebd093cf\\lib\\typescriptServices.js\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path:
npm ERR!    'E:\\Devfolio_work\\ethglobal-devfolio\\node_modules\\.staging\\typescript-ebd093cf\\lib\\typescriptServices.js',
npm ERR!   parent: 'root' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Roaming\npm-cache\_logs\2019-01-09T16_55_24_342Z-debug.log

lerna.json

{
  "packages": [
    "packages/*"
  ],
  "version": "independent"
}

我的环境

lerna --version 3.5.1

npm --version 6.4.1

node --version 10.5.0

操作系统版本

Windows 10 1709

回答如下:

我终于找到了解决方案,这似乎是Windows的问题,只需在当前工作目录中的admin命令提示符下运行此命令,它就会起作用。

发布评论

评论列表(0)

  1. 暂无评论