报错
代码语言:javascript复制$ npm run build
> mpvue@1.0.0 build D:wampwwwwebpackmpvuemy-project
> node build/build.js wx
D:wampwwwwebpackmpvuemy-projectbuildbuild.js:19
if (err) throw err
^
Error: EPERM: operation not permitted, unlink 'D:wampwwwwebpackmpvuemy-projectdistwxcomponents'
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:UsersAdministrator.KINGAppDataRoamingnpm-cache_logs2019-03-04T01_42_19_971Z-debug.log
解决
管理员身份运行cmd
目录权限
把所有的目录权限全给了
关机重启
修改目录权限后,以管理员身份运行cmd,再次执行npm run build 无效,重启再次执行后可以了。不知道windows是怎么了。