我正在尝试用纱线构建一个有角度的项目,但是我总是会遇到一些错误。
Build failed with error code: 1"
success Saved lockfile.
Done in 72.30s.
实际上,发生此错误是因为node-gyp失败:
c:\temp\helloworld>node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.12.0 | win32 | x64
gyp http GET https://nodejs.org/download/release/v8.12.0/node-v8.12.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v8.12.0/node-v8.12.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v8.12.0/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v8.12.0/win-x64/node.lib
gyp http GET https://nodejs.org/download/release/v8.12.0/win-x86/node.lib
gyp http 200 https://nodejs.org/download/release/v8.12.0/SHASUMS256.txt
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at TLSWrap.onread (net.js:622:25)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\matyig\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd c:\temp\helloworld
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
c:\temp\helloworld>
有什么主意吗?
答案 0 :(得分:1)
Node-gyp通过下载脚本来执行脚本。似乎互联网连接不稳定,这就是为什么脚本下载在两者之间停止的原因。 SOme文件确实很大,需要像SHASUMS256.txt这样下载。请尝试在稳定的Internet连接上运行命令。