npm install 報錯如下,
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @biomejs/biome@1.9.4 postinstall: `node scripts/postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @biomejs/biome@1.9.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2025-05-26T09_41_00_678Z-debug.log
根據錯誤信息,@biomejs/biome
的 postinstall
腳本執行失敗。以下是分步解決方案:
1. 檢查 Node.js 和 npm 版本
確保 Node.js 版本符合 Biome 的要求(通常需要較新版本):
bash
node -v # 檢查 Node.js 版本&