一、报错详情:
1.详细报错信息
error code EPERM
55 error syscall mkdir
56 error path D:\node\anzhuang\node_modules\.staging
57 error errno -4048
58 error Error: EPERM: operation not permitted, mkdir 'D:\node\anzhuang\node_modules\.staging'
58 error [OperationalError: EPERM: operation not permitted, mkdir 'D:\node\anzhuang\node_modules\.staging'] {
58 error cause: [Error: EPERM: operation not permitted, mkdir 'D:\node\anzhuang\node_modules\.staging'] {
58 error errno: -4048,
58 error code: 'EPERM',
58 error syscall: 'mkdir',
58 error path: 'D:\\node\\anzhuang\\node_modules\\.staging'
58 error },
58 error errno: -4048,
58 error code: 'EPERM',
58 error syscall: 'mkdir',
58 error path: 'D:\\node\\anzhuang\\node_modules\\.staging'
58 error }
59 error The operation was rejected by your operating system.
59 error It's possible that the file was already in use (by a text editor or antivirus),
59 error or that you lack permissions to access it.
59 error
59 error If you believe this might be a permissions issue, please double-check the
59 error permissions of the file and its containing directories, or try running
59 error the command again as root/Administrator.
60 verbose exit [ -4048, true ]
二、解决办法:
方法1:
打开cmd时候,使用管理员身份
三、解决完成
查看TS版本有以下几种方法:
1.通过命令行:
- 检查电脑是否安装了TS:tsc-v
- 查看已安装的TS版本:tsc-v1
2.通过npm:
- 查看本机TS版本:npm view typescript version
- 检查本地是否安装了TS:npm ls typescript
- 全局安装TS:npm i -g typescript12
- 卸载TS:npm uninstall typescript2