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 error [email protected] postinstall:
node scripts/build.js
5162 error Exit status 1 5163 error Failed at the [email protected] 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 ]
And here is my repository: https://github.com/Jacob-Elder/react-socket.io-messaging
This is my aws configuration
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!
Node-sass is a library that provides binding for Node.js to LibSass, the C version of the popular stylesheet preprocessor, Sass. It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware. Find it on npm: https://www.npmjs.com/package/node-sass.
To solve the error "Cannot find module 'node-sass'", make sure to install the node-sass package by opening your terminal in your project's root directory and running the following command: npm i -D node-sass and restart your IDE and development server.
Node sass is a library that allows binding for Node. js to LibSass, the C version of Sass's stylesheet preprocessor. It compiles . scss files to CSS with speed and automatically through connected middleware. SASS (Syntactically Awesome Style Sheets) is a comprehensive version of CSS.
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".
Judging from this similar stackexchange post: https://serverfault.com/questions/204893/aws-ec2-and-build-essential,
which in turn points to the AWS docs, you may have to run sudo yum groupinstall "Development Tools"
to get some additional binaries
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With