]> cat aescling's git repositories - mastodon.git/commitdiff
Rebuild node-sass (#3002)
authorDaigo 3 Dango <zunda@users.noreply.github.com>
Fri, 12 May 2017 20:04:41 +0000 (10:04 -1000)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 12 May 2017 20:04:41 +0000 (22:04 +0200)
Got an error in asset precompile on Heroku:
Module build failed: Error: ENOENT: no such file or directory, scandir '/tmp/.../node_modules/node-sass/vendor'

ref: https://github.com/rails/webpacker#troubleshooting

package.json

index 23bc66dac6396cecab51a3359eafdd53b1f45b2f..41bb140e091d3360e58c7a415e110162cdd3bba5 100644 (file)
@@ -10,7 +10,8 @@
     "storybook": "start-storybook -p 9001 -c storybook",
     "test": "npm run test:lint && npm run test:mocha",
     "test:lint": "eslint -c .eslintrc.yml --ext=js --ext=jsx app/javascript/",
-    "test:mocha": "mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx"
+    "test:mocha": "mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx",
+    "postinstall": "npm rebuild node-sass"
   },
   "repository": {
     "type": "git",