为什么我的AWS实例无法安装node-sass pacakage? [英] Why Can't My AWS instance install node-sass pacakage?

查看:182
本文介绍了为什么我的AWS实例无法安装node-sass pacakage?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I made an app using Node and am trying to host it using AWS's Elastic Beanstalk, but it always fails npm install when it reaches node-sass. Here is the error from the logs:

5162错误node-sass@4.5.0安装后:node scripts/build.js 5162错误退出状态1 5163错误在node-sass@4.5.0后安装脚本'node scripts/build.js'失败. 5163错误确保已安装最新版本的node.js和npm. 5163错误如果这样做,这很可能是node-sass软件包的问题, 5163错误不是npm本身. 5163错误告诉作者这在您的系统上失败: 5163错误节点脚本/build.js 5163错误您可以通过以下方式获取有关如何为此项目打开问题的信息: 5163错误npm bug节点ass 5163错误,或者如果该错误不可用,则可以通过以下方式获取其信息: 5163错误npm所有者ls节点-ass 5163错误上面可能还有其他日志记录输出. 5164详细出口[1,正确]

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

这是我的AWS配置

我搜索了此问题,发现有些人使用'--unsafe-perm'标志重新安装了node-sass,但这似乎不是权限问题.我是AWS和编码的新手,所以非常感谢您的帮助!

I searched this issue and found some people reinstalled node-sass with the '--unsafe-perm' flag, but this doesn't seem to be a permissions issue. I'm new to AWS and coding so any help is much appreciated!

推荐答案

所以我在节点-sass上的npm安装也失败了.我收到与您大致相同的错误消息,但是在您在原始帖子中提到的行上方几行,我看到此"make:g ++:找不到命令 make:*** [Release/obj.target/libsass/src/libsass/src/ast.o]错误127.

So I also had npm install fail on node-sass. I get roughly the same error message as you, but then a few lines above the lines you mention in the original post, I see this "make: g++: Command not found make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127".

从类似的stackexchange帖子中判断: https://serverfault.com/questions/204893/aws-ec2-and-build-essential

Judging from this similar stackexchange post: https://serverfault.com/questions/204893/aws-ec2-and-build-essential,

进而指向AWS文档,您可能必须运行sudo yum groupinstall "Development Tools"以获得一些其他二进制文件

which in turn points to the AWS docs, you may have to run sudo yum groupinstall "Development Tools" to get some additional binaries

这篇关于为什么我的AWS实例无法安装node-sass pacakage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆