npm error code EPERM
npm error syscall open
npm error path D:\app\node-v20.15.0\node_cache\_cacache\index-v5\f7\bd\1c68c439be7ed1fe248b942cae7e48b24159219ffb45f7b0faa14dd09738
npm error errno -4048
npm error Error: EPERM: operation not permitted, open 'D:\app\node-v20.15.0\node_cache\_cacache\index-v5\f7\bd\1c68c439be7ed1fe248b942cae7e48b24159219ffb45f7b0faa14dd09738'
npm error at async open (node:internal/fs/promises:639:25)
npm error at async writeFile (node:internal/fs/promises:1219:14)
npm error at async Object.insert (D:\app\node-v20.15.0\node_modules\npm\node_modules\cacache\lib\entry-index.js:132:5)
npm error at async CacheEntry.store (D:\app\node-v20.15.0\node_modules\npm\node_modules\make-fetch-happen\lib\cache\entry.js:308:7)
npm error at async fetch (D:\app\node-v20.15.0\node_modules\npm\node_modules\make-fetch-happen\lib\fetch.js:98:7)
npm error at async RegistryFetcher.packument (D:\app\node-v20.15.0\node_modules\npm\node_modules\pacote\lib\registry.js:91:19)
npm error at async RegistryFetcher.manifest (D:\app\node-v20.15.0\node_modules\npm\node_modules\pacote\lib\registry.js:129:23)
npm error at async getManifest (D:\app\node-v20.15.0\node_modules\npm\node_modules\libnpmexec\lib\index.js:27:22)
npm error at async missingFromTree (D:\app\node-v20.15.0\node_modules\npm\node_modules\libnpmexec\lib\index.js:61:22)
npm error at async D:\app\node-v20.15.0\node_modules\npm\node_modules\libnpmexec\lib\index.js:163:32 {
npm error errno: -4048,
npm error code: 'EPERM',
npm error syscall: 'open',
npm error path: 'D:\\app\\node-v20.15.0\\node_cache\\_cacache\\index-v5\\f7\\bd\\1c68c439be7ed1fe248b942cae7e48b24159219ffb45f7b0faa14dd09738'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It's possible that the file was already in use (by a text editor or antivirus),
npm error or that you lack permissions to access it.
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error Log files were not written due to an error writing to the directory: D:\app\node-v20.15.0\node_cache\_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
这个错误是因为你的node_cache文件权限不够导致的
右击node_cache文件——属性——安全——编辑,全部打✔
点击应用——确定
然后win+r输入cmd
测试输入npm create vue@latest,成功