今天下午使用npm下载websocket时遇到了一个错误,可能是我实战经验太少了,这个错误找了一个多小时。在这过程中升级了node的版本、又重新安装了淘宝镜像…一系列,主要是刚开始我以为我之前安装的python已经配置好环境变量(我之前上课的时候一直都有在用python,所以没有理由怀疑这个),而且我主观的以为这刚python应该没有多大的关系,于是就在那些细节末节的错误中找错,结果找了…。
具体错误如下:
npm ERR! code 1
npm ERR! path F:ueprojectecharts_demokoa_server
ode_modulesufferutil
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.exe /d /s /c node-gyp rebuild
npm ERR! ????????????????????????????????ò???????????????/m???????
npm ERR! bufferutil.c
npm ERR! win_delay_load_hook.cc
npm ERR! C:\Users\ASUS\AppData\Local
ode-gyp\Cache\10.22.1\x64
ode.lib : fatal error LNK1107: invalid or corrupt file: cannot read at 0x433943 [F:ueprojectecharts_demokoa_server
ode_modulesufferutiluildufferutil.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@10.