rakibulb@Rakibuls-MacBook-Air advanced-todolist % npm install
npm error code 127
npm error path /Users/rakibulb/Documents/ComputerScience/Portfolio Projects/HTML:CSS:JS/advanced-todolist/node_modules/bufferutil
npm error command failed
npm error command sh -c node-gyp-build
npm error sh: node-gyp-build: command not found
npm error A complete log of this run can be found in: /Users/rakibulb/.npm/_logs/2024-05-20T15_36_50_210Z-debug-0.log
我刚刚克隆了我在台式电脑上使用的一个存储库,我将它克隆到了我的 MacOS,当我尝试执行
npm install
时,我收到了该错误,我尝试查找其他堆栈溢出帖子,但它们没有帮助.
我尝试卸载我的
Node.js
,然后重新安装,我还将我的npm
更新到最新版本,但没有任何帮助。
这是我的
package.json
{
"name": "todo-enhanced",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@hookform/resolvers": "^3.3.4",
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "^5.13.0",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@vercel/postgres": "^0.8.0",
"bcrypt": "^5.1.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.378.0",
"next": "14.2.3",
"next-auth": "^4.24.7",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.51.4",
"react-hot-toast": "^2.4.1",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"prisma": "^5.13.0",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
似乎您错过了
node-gyp-build
本身。
尝试
npm install -g node-gyp-build
,然后重试您的 npm install
。