在 React 项目上运行 npm install 时出现以下错误。
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/binding/src/binding.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 (/Users/ramin/dev/frontend-v2/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.4.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.2.0/bin/node" "/Users/ramin/dev/frontend-v2/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" …Run Code Online (Sandbox Code Playgroud) 我有一个 AWS CodeBuild 项目,它尝试安装无服务器框架,但在标题中返回错误,但它表示框架已成功安装。我的理解是,这无法安装 snappy 模块。这是为什么?我该如何解决这个问题?
我在 buildspec.yaml 中运行的命令是:
npm install -g serverless
Run Code Online (Sandbox Code Playgroud)
我的用户是:
/root
Run Code Online (Sandbox Code Playgroud)