论坛升级至 v1.10.2
-
这次依然和过去一样升级到某个较旧的 nodebb 版本,可以避免一些东西太新扩展不兼容的情况。不过还是在升级过程中意外收获了很多错误报告。
sharp.target.mk:136: recipe for target 'Release/obj.target/sharp/src/common.o' failed make: Leaving directory '/home/nodebb/node_modules/sharp/build' make: *** [Release/obj.target/sharp/src/common.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 4.14.129-bbrplus gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/nodebb/node_modules/sharp gyp ERR! node -v v12.18.3 gyp ERR! node-gyp -v v5.1.0
早有用户发现这个问题:https://community.nodebb.org/topic/14670/consider-add-to-documentation-node-version
开始没意识到是因为 nodejs 版本出的 make 错误,解决方法是降级到 node v10.x 。当然,nodebb 后续版本解决了这个错误。删除 nodejs
apt-get --purge remove nodejshttps://github.com/nodesource/distributions
debian 用这个:
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs通过命令 node -v 检查版本,这样就可以继续 ./nodebb upgrade 咯,如果没有其他错误会在执行些时间后升级成功。
我依旧建议用 yarn 安装更新。