vue安装veux

现在使用npm i 会默认安装vuex4,
vuex4只适用于vue3,
如果使用的vue环境是vue3,
安装vuex时

npm i vuex

Vue2安装vuex时,需要用这个命令

npm i vuex@3

指定安装的vuex为3版本,
否则会报错

npm WARN registry Unexpected warning for https://registry.npm.taobao.org/: Miscellaneous Warning EPERM: EPERM: operation not permitted, open 'D:\\F\\SOFTWORK\\nodejs\\node_cache\\_cacache\\tmp\\88347256'
npm WARN registry Using stale data from https://registry.npm.taobao.org/ due to a request error during revalidation.
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path D:\F\SOFTWORK\nodejs\node_cache\_cacache\tmp\717f4367
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'D:\F\SOFTWORK\nodejs\node_cache\_cacache\tmp\717f4367'
npm ERR!  [OperationalError: EPERM: operation not permitted, open 'D:\F\SOFTWORK\nodejs\node_cache\_cacache\tmp\717f4367'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, open 'D:\F\SOFTWORK\nodejs\node_cache\_cacache\tmp\717f4367'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'open',
npm ERR!     path: 'D:\\F\\SOFTWORK\\nodejs\\node_cache\\_cacache\\tmp\\717f4367'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'D:\\F\\SOFTWORK\\nodejs\\node_cache\\_cacache\\tmp\\717f4367'
npm ERR! }
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.

你可能感兴趣的:(vue安装veux)