npm install vue-router --save时报错

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\_ch                                                       [email protected]@chokidar\node_modules\fsevents):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory,                                                        rename 'E:\vue\lx-project\node_modules\.staging\fsevents-65e143a2\node_modules\                                                       abbrev' -> 'E:\vue\lx-project\node_modules\.staging\abbrev-0bd7ae94'

npm ERR! path E:\vue\lx-project\node_modules\[email protected]@postcss\node_module                                                       s\chalk
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'E:\vue\lx-project\nod                                                       e_modules\[email protected]@postcss\node_modules\chalk' -> 'E:\vue\lx-project\node                                                       _modules\[email protected]@postcss\node_modules\chalk'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\你的用户名\AppData\Roaming\npm-cache\_logs\2017-10-30T13_24_2                                                       1_330Z-debug.log

解决方法:

npm install -g vue-router --save

你可能感兴趣的:(npm install vue-router --save时报错)