Ruby on rails 无法预编译资源

Ruby on rails 无法预编译资源,ruby-on-rails,ruby,yarnpkg,node-sass,Ruby On Rails,Ruby,Yarnpkg,Node Sass,我试图预编译资产,但得到了一个相当模糊的错误。我认为这可能是节点sass的问题,这导致我尝试通过Thread进行安装,但也失败了,出现了一个不太有用的错误。任何帮助都将不胜感激 预编译资产似乎在以下位置出现问题: gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/path/to/example.com/nod

我试图预编译资产,但得到了一个相当模糊的错误。我认为这可能是节点sass的问题,这导致我尝试通过Thread进行安装,但也失败了,出现了一个不太有用的错误。任何帮助都将不胜感激

预编译资产似乎在以下位置出现问题:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/path/to/example.com/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
gyp ERR! System Linux 2.6.32-042stab120.19
gyp ERR! command "/root/.nvm/versions/node/v15.3.0/bin/node" "/path/to/example.com/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /path/to/example.com/node_modules/node-sass
gyp ERR! node -v v15.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1

通过纱线添加节点sass具有类似的输出:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (path/to/example.com/node_modules/@rails/webpacker/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
gyp ERR! System Linux 2.6.32-042stab120.19
gyp ERR! command "/root/.nvm/versions/node/v15.3.0/bin/node" "path/to/example.com/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd path/to/example.com/node_modules/@rails/webpacker/node_modules/node-sass
gyp ERR! node -v v15.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

看起来您正在尝试在节点15上安装旧版本的节点sass。节点15仅在节点sass v5上受支持

是否尝试运行
npm rebuild