报错
$ npm run build > mpvue@1.0. build D:\wamp\www\webpack\mpvue\my-project
> node build/build.js wx D:\wamp\www\webpack\mpvue\my-project\build\build.js:
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
npm ERR! mpvue@1.0. build: `node build/build.js wx`
npm ERR! Exit status
npm ERR!
npm ERR! Failed at the mpvue@1.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\--04T01_42_19_971Z-debug.log
解决
管理员身份运行cmd
目录权限
把所有的目录权限全给了
关机重启
修改目录权限后,以管理员身份运行cmd,再次执行npm run build 无效,重启再次执行后可以了。不知道windows是怎么了。