系统信息:
linux
nvidia公用机
node版本:16.13.1
apollo版本:5.5
使用yarn 安装依赖就报错了 大概是image-webpack-loader这个依赖的问题,但是不知道咋个解决(能不能提供一个node_modules的包,谢谢)
报错信息:
npm ERR! code 1
npm ERR! path /home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/sharp/build'
npm ERR! TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR! CXX(target) Release/obj.target/sharp/src/common.o
npm ERR! sharp.target.mk:137: recipe for target 'Release/obj.target/sharp/src/common.o' failed
npm ERR! make: Leaving directory '/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/sharp/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.14.2 | linux | arm64
npm ERR! (node:22950) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use node --trace-deprecation ...
to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/nvidia/.node-gyp/16.14.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/nvidia/.node-gyp/16.14.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/nvidia/.node-gyp/16.14.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! :0:0: warning: "_GLIBCXX_USE_CXX11_ABI" redefined
npm ERR! :0:0: note: this is the location of the previous definition
npm ERR! ../src/common.cc:25:10: fatal error: vips/vips8: No such file or directory
npm ERR! #include <vips/vips8>
npm ERR! ^~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make
failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 4.9.201-tegra
npm ERR! gyp ERR! command "/home/nvidia/.nvm/versions/node/v16.14.2/bin/node" "/home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/nvidia/newApollo/apollo/modules/dreamview/frontend/node_modules/sharp
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok