Skip to content

Commit

Permalink
Add 'enact' install script to ensure node_sass module gets installed
Browse files Browse the repository at this point in the history
Node-sass-middleware has a dependency module, node-sass, which
needs to get installed first. Unfortunately, for some reason,
the current version of node-sass does not properly run
its install script to download the binary file it needs to
operate. See sass/node-sass#1579
for more details.

To fix this, we hadd an 'enact' script to elasticbeanstalk
configuration, to tell it to run the node-sass installer
manually during deployment. This ensures that the binary
file gets installed.
  • Loading branch information
rmacqueen committed Aug 11, 2016
1 parent 2d85c9c commit 3918978
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .ebextensions/node_sass_install.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
commands:
create_enact_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/enact"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/enact/node_sass_install.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
. /opt/elasticbeanstalk/support/envvars
node /var/app/current/node_modules/node-sass-middleware/node_modules/node-sass/scripts/install.js

0 comments on commit 3918978

Please sign in to comment.