报错信息

Module build failed: Error: Missing binding
/node_modules/node-sass/vendor/linux-x64-57/binding.node

原来是我把我mac机器上的node_moduels拷贝到我的开发机linux机器上,导致环境不统一。

Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x

Found bindings for the following environments:
- OS X 64-bit with Node.js 8.x

我需要重新开始安装。
必须删掉node_moduels重新安装,不然npm install的时候因为本地有,就不会重新安装。

重新install的时候也报错了
报错信息

gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/users/用户名/fe-duer-webssr/node_modules/node-sass/build'
g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.4"' -I/home/users/用户名/.node-gyp/8.9.1/include/node -I/home/users/用户名/.node-gyp/8.9.1/src -I/home/users/用户名/.node-gyp/8.9.1/deps/openssl/config -I/home/users/用户名/.node-gyp/8.9.1/deps/openssl/openssl/include -I/home/users/用户名/.node-gyp/8.9.1/deps/uv/include -I/home/users/用户名/.node-gyp/8.9.1/deps/zlib -I/home/users/用户名/.node-gyp/8.9.1/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++0x -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
cc1plus: error: unrecognized command line option "-std=gnu++0x"
cc1plus: error: unrecognized command line option "-std=c++0x"
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
make: Leaving directory `/home/users/用户名/fe-duer-webssr/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit

怀疑是gcc版本不多,查看gcc版本

gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)

重新下载

​安装gcc​