Reputation: 57
When I am deploying react project on Vercel, build failed with this kind of message.
Command "npm install" exited with 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?
Upvotes: 1
Views: 4495
Reputation: 1
just check for the version of eslint and update to the latest using
npm show eslint version
node i eslint@latest
and update the vite or react version you are using
node i vite@latest
pro tip: exclude the unnecessary dependencies you are using in package.json
Upvotes: 0
Reputation: 1088
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. I think 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.
Upvotes: 4