简体   繁体   English

Vercel 部署构建失败,命令 npm install exited with 1

[英]Vercel deployment build failed with command npm install exited with 1

When I am deploying react project on Vercel, build failed with this kind of message.当我在 Vercel 上部署 react 项目时,构建失败并显示此类消息。
Command "npm install" exited with 1.命令“npm install”以 1 退出。
Here is the error log.这是错误日志。

npm ERR!   g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/vercel/.node-gyp/16.15.0/include/node -I/vercel/.node-gyp/16.15.0/src -I/vercel/.node-gyp/16.15.0/deps/openssl/config -I/vercel/.node-gyp/16.15.0/deps/openssl/openssl/include -I/vercel/.node-gyp/16.15.0/deps/uv/include -I/vercel/.node-gyp/16.15.0/deps/zlib -I/vercel/.node-gyp/16.15.0/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp

Here is screen shot.这是屏幕截图。 enter image description here在此处输入图像描述

How can I solve this kind of problem?我该如何解决这种问题?

I met that kind of case on this year.我今年就遇到过这种情况。 I think that is because of node version.我认为这是因为节点版本。 The vercel's default node version is the latest one. vercel 的默认节点版本是最新的。 I think 16.x.我认为16.x。 But your project may should work with lower node version.但是您的项目可能应该使用较低的节点版本。 Please have a check the node version.请检查节点版本。 I attached screen shot of how you can check the node version on vercel.我附上了如何在 vercel 上检查节点版本的屏幕截图。 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM