node.js - 为什么我的 AWS 实例无法安装 node-sass 包?

标签 node.js amazon-web-services sass amazon-elastic-beanstalk node-sass

我使用 Node 制作了一个应用程序,并尝试使用 AWS 的 Elastic Beanstalk 来托管它,但是当它到达 node-sass 时,它总是无法安装 npm。这是日志中的错误:

5162 error node-sass@4.5.0 postinstall: node scripts/build.js 5162 error Exit status 1 5163 error Failed at the node-sass@4.5.0 postinstall script 'node scripts/build.js'. 5163 error Make sure you have the latest version of node.js and npm installed. 5163 error If you do, this is most likely a problem with the node-sass package, 5163 error not with npm itself. 5163 error Tell the author that this fails on your system: 5163 error node scripts/build.js 5163 error You can get information on how to open an issue for this project with: 5163 error npm bugs node-sass 5163 error Or if that isn't available, you can get their info via: 5163 error npm owner ls node-sass 5163 error There is likely additional logging output above. 5164 verbose exit [ 1, true ]



这是我的存储库:https://github.com/Jacob-Elder/react-socket.io-messaging

This is my aws configuration

我搜索了这个问题,发现有些人用“--unsafe-perm”标志重新安装了 node-sass,但这似乎不是权限问题。我是 AWS 和编码新手,因此非常感谢任何帮助!

最佳答案

所以我在 node-sass 上的 npm install 也失败了。我收到与您大致相同的错误消息,但是在您在原始帖子中提到的几行上方,我看到了“make: g++: Command not found
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] 错误 127"。

从这个类似的stackexchange帖子来看:https://serverfault.com/questions/204893/aws-ec2-and-build-essential ,

这又指向 AWS 文档,您可能必须运行 sudo yum groupinstall "Development Tools"获取一些额外的二进制文件

关于node.js - 为什么我的 AWS 实例无法安装 node-sass 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42918425/

相关文章:

node.js - 为什么运行npm install时npm-shrinkwrap.json会更改

amazon-web-services - AWS s3 私有(private)存储桶创建

amazon-web-services - 用于内部弹性负载均衡器来源的 AWS Cloudfront

css - Angular 2 样式在开发工具中未按我的意愿显示

node.js - 出现错误 : EISDIR when trying to write scp'd file to directory

node.js - 仅在特定时间运行一次 Google Cloud Function

javascript - 如何获得两个词之间的所有内容

amazon-web-services - Beanstalk .ebextensions 错误 - 模板的资源 block 中 Unresolved 资源依赖性

css - 这个mixin是什么意思?

sass - Compass 1.x 的最低浏览器支持示例