安装redux时,报错信息如下:
npm WARN checkPermissions Missing write access to C:\Users\Administrator\Desktop\myapp\node_mo
dules\redux
npm WARN @typescript-eslint/eslint-plugin@1.6.0 requires a peer of typescript@* but none is in
stalled. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.6.0 requires a peer of typescript@* but none is installed
. You must install peer dependencies yourself.
npm WARN @typescript-eslint/typescript-estree@1.6.0 requires a peer of typescript@* but none i
s installed. You must install peer dependencies yourself.
npm WARN ts-pnp@1.1.2 requires a peer of typescript@* but none is installed. You must install
peer dependencies yourself.
npm WARN tsutils@3.10.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev
|| >= 3.4.0-dev but none is installed. You must install peer dependencies yourself.
npm ERR! path C:\Users\Administrator\Desktop\myapp\node_modules\symbol-observable
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'C:\Users\Administrator\Desktop\myap
p\node_modules\symbol-observable'
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\Administrator\AppData\Roaming\npm-cache\_logs\2019-07-14T17_44_41_565Z-d
ebug.log
原因:是因为你的dev环境种缺少的typescript的支持,最新的redux版本需要依赖typescript。
解决方法:安装typescript到你的dev环境中,即可解决。输入以下命令。
npm install --save-dev typescript