mpvue——Error: EPERM: operation not permitted

报错

$ npm run build

> mpvue@1.0.0 build D:\wamp\www\webpack\mpvue\my-project
> node build/build.js wx

D:\wamp\www\webpack\mpvue\my-project\build\build.js:19
  if (err) throw err
           ^

Error: EPERM: operation not permitted, unlink 'D:\wamp\www\webpack\mpvue\my-project\dist\wx\components'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mpvue@1.0.0 build: `node build/build.js wx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mpvue@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator.KING\AppData\Roaming\npm-cache\_logs\2019-03-04T01_42_19_971Z-debug.log

 

解决

管理员身份运行cmd

 

目录权限

把所有的目录权限全给了

 

关机重启

修改目录权限后,以管理员身份运行cmd,再次执行npm run build 无效,重启再次执行后可以了。不知道windows是怎么了。

 

posted @ 2019-03-04 10:09  。思索  阅读(408)  评论(0编辑  收藏  举报