`npm rebuild node-sass --force` to build the binding

Hi I currently have a local ionic app on my computer. When I run ionic serve I get the error above. I go ahead and do nom rebuild node-sass and it works. After I commit my changes and then push to ionic master. I similarly get the error above but there’s no way for me to run nom rebuild node-sass. Here is my full error:

Error: Missing binding /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x

Found bindings for the following environments:

  • OS X 64-bit with Node.js 8.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.
at module.exports (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/lib/binding.js:15:13)
at Object. (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:569:30)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/usr/src/app/node_modules/@ionic/app-scripts/dist/core/bundle-components.js:6:16)
npm info lifecycle homeinspectorplus@0.0.1~build: Failed to exec build script
npm ERR! errno 1
npm ERR! homeinspectorplus@0.0.1 build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the homeinspectorplus@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gitlab-runner/.npm/_logs/2017-12-05T23_27_42_786Z-debug.log
npm run build failed
Running after script…
$ run "clean-up"
ERROR: Job failed: exit status 1

1 Like

Hi, Do you receive any solution?
If you did, can tell us please.

I’ll appreciate!

@RaulSagastume The way I had to do it because I’m on a mac is to create an instance on digital ocean. From there I built it and when I got the error I ran the npm rebuild node-sass-force. I had to make sure that the environment was going to match the current one on ionic. Another way to do it would be to download the missing environment and manually add it. The first way on digital ocean is what ended up working for me.

1 Like

Thank you so much for the answer!

I gonna try it!