sugaroverflow / drone-companion-app

collaboration project between Code for Canada + Transport Canada
MIT License
1 stars 3 forks source link

Build failure: node-sass binding issue on Azure #165

Closed sugaroverflow closed 5 years ago

sugaroverflow commented 5 years ago

When using scss and node-sass as the loader, Azure encounters a binding issue:

Node Sass could not find a binding for your current environment: Linux/musl 64-bit with Node.js 10.x

Previously, we were able to solve this issue with the website by running node rebuild node-sass pre-deploy or on the server - but neither of these seems to be working.

Further investigation indicates there might be a version mismatch issue (I think it was previously as well) : https://stackoverflow.com/questions/41874420/express-app-with-node-sass-on-azure-app-service

Here's the full error log

2019-06-04T02:50:45.482627710Z: [INFO]  ERROR in ./src/frontend/App.css (/node_modules/css-loader/dist/cjs.js!/node_modules/sass-loader/lib/loader.js!./src/frontend/App.css)
2019-06-04T02:50:45.482648509Z: [INFO]  Module build failed (from /node_modules/sass-loader/lib/loader.js):
2019-06-04T02:50:45.482652209Z: [INFO]  Error: Missing binding /node_modules/node-sass/vendor/linux_musl-x64-64/binding.node
2019-06-04T02:50:45.482655709Z: [INFO]  Node Sass could not find a binding for your current environment: Linux/musl 64-bit with Node.js 10.x
2019-06-04T02:50:45.482659309Z: [INFO]
2019-06-04T02:50:45.482662709Z: [INFO]  Found bindings for the following environments:
2019-06-04T02:50:45.482666209Z: [INFO]    - Linux 64-bit with Node.js 10.x
2019-06-04T02:50:45.482669609Z: [INFO]
2019-06-04T02:50:45.482690909Z: [INFO]  This usually happens because your environment has changed since running `npm install`.
2019-06-04T02:50:45.482694609Z: [INFO]  Run `npm rebuild node-sass` to download the binding for your current environment.
2019-06-04T02:50:45.482698209Z: [INFO]      at module.exports (/node_modules/node-sass/lib/binding.js:15:13)
2019-06-04T02:50:45.482701809Z: [INFO]      at Object.<anonymous> (/node_modules/node-sass/lib/index.js:14:35)
2019-06-04T02:50:45.482705809Z: [INFO]      at Module._compile (/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
2019-06-04T02:50:45.482709409Z: [INFO]      at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
2019-06-04T02:50:45.482713009Z: [INFO]      at Module.load (internal/modules/cjs/loader.js:598:32)
2019-06-04T02:50:45.482716609Z: [INFO]      at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
2019-06-04T02:50:45.482720209Z: [INFO]      at Function.Module._load (internal/modules/cjs/loader.js:529:3)
2019-06-04T02:50:45.482725509Z: [INFO]      at Module.require (internal/modules/cjs/loader.js:636:17)
2019-06-04T02:50:45.482729409Z: [INFO]      at require (/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
2019-06-04T02:50:45.482733309Z: [INFO]      at Object.sassLoader (/node_modules/sass-loader/lib/loader.js:46:72)
2019-06-04T02:50:45.482736909Z: [INFO]   @ ./src/frontend/App.css 2:14-141
2019-06-04T02:50:45.482740409Z: [INFO]   @ ./src/frontend/App.js
2019-06-04T02:50:45.482747309Z: [INFO]   @ ./src/frontend/index.js
2019-06-04T02:50:45.482767609Z: [INFO]   @ multi babel-polyfill ./src/frontend/index.js
2019-06-04T02:50:45.482771109Z: [INFO]
2019-06-04T02:50:45.482774509Z: [INFO]  ERROR in /node_modules/@gctools-components/aurora-ds/css/aurora.min.css (/node_modules/css-loader/dist/cjs.js!/node_modules/sass-loader/lib/loader.js!/node_modules/@gctools-components/aurora-ds/css/aurora.min.css)
2019-06-04T02:50:45.482778209Z: [INFO]  Module build failed (from /node_modules/sass-loader/lib/loader.js):
2019-06-04T02:50:45.482781709Z: [INFO]  Error: Missing binding /node_modules/node-sass/vendor/linux_musl-x64-64/binding.node
2019-06-04T02:50:45.482802908Z: [INFO]  Node Sass could not find a binding for your current environment: Linux/musl 64-bit with Node.js 10.x
2019-06-04T02:50:45.482806408Z: [INFO]
2019-06-04T02:50:45.482809608Z: [INFO]  Found bindings for the following environments:
2019-06-04T02:50:45.482835108Z: [INFO]    - Linux 64-bit with Node.js 10.x
2019-06-04T02:50:45.482838608Z: [INFO]
2019-06-04T02:50:45.482842208Z: [INFO]  This usually happens because your environment has changed since running `npm install`.
2019-06-04T02:50:45.482845808Z: [INFO]  Run `npm rebuild node-sass` to download the binding for your current environment.
2019-06-04T02:50:45.482849508Z: [INFO]      at module.exports (/node_modules/node-sass/lib/binding.js:15:13)
2019-06-04T02:50:45.482853108Z: [INFO]      at Object.<anonymous> (/node_modules/node-sass/lib/index.js:14:35)
2019-06-04T02:50:45.482857008Z: [INFO]      at Module._compile (/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
2019-06-04T02:50:45.482860708Z: [INFO]      at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
2019-06-04T02:50:45.482864308Z: [INFO]      at Module.load (internal/modules/cjs/loader.js:598:32)
2019-06-04T02:50:45.482867808Z: [INFO]      at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
2019-06-04T02:50:45.482871508Z: [INFO]      at Function.Module._load (internal/modules/cjs/loader.js:529:3)
2019-06-04T02:50:45.482875108Z: [INFO]      at Module.require (internal/modules/cjs/loader.js:636:17)
2019-06-04T02:50:45.482878608Z: [INFO]      at require (/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
2019-06-04T02:50:45.482882208Z: [INFO]      at Object.sassLoader (/node_modules/sass-loader/lib/loader.js:46:72)
2019-06-04T02:50:45.482886208Z: [INFO]   @ /node_modules/@gctools-components/aurora-ds/css/aurora.min.css 2:14-110
2019-06-04T02:50:45.482889908Z: [INFO]   @ ./src/frontend/index.js
2019-06-04T02:50:45.482893408Z: [INFO]   @ multi babel-polyfill ./src/frontend/index.js
2019-06-04T02:50:45.482897108Z: [INFO]  Child html-webpack-plugin for "index.html":
2019-06-04T02:50:45.482900808Z: [INFO]       1 asset
2019-06-04T02:50:45.482904308Z: [INFO]      Entrypoint undefined = index.html
2019-06-04T02:50:45.482908208Z: [INFO]      [0] /node_modules/html-webpack-plugin/lib/loader.js!./public/index.html 505 bytes {0} [built]
2019-06-04T02:50:45.482912008Z: [INFO]      [2] (webpack)/buildin/global.js 472 bytes {0} [built]
2019-06-04T02:50:45.482936407Z: [INFO]      [3] (webpack)/buildin/module.js 497 bytes {0} [built]
2019-06-04T02:50:45.482940307Z: [INFO]          + 1 hidden module
2019-06-04T02:50:45.622980137Z: [ERROR]  npm ERR! code ELIFECYCLE
2019-06-04T02:50:45.626689511Z: [ERROR]  npm ERR! errno 2
2019-06-04T02:50:45.632911068Z: [ERROR]  npm ERR! DroneCompanionApp@1.0.0 build: `cross-env NODE_ENV=production webpack --mode production`
2019-06-04T02:50:45.660057980Z: [ERROR]  npm ERR! Exit status 2
2019-06-04T02:50:45.664924046Z: [ERROR]  npm ERR!
2019-06-04T02:50:45.686628296Z: [ERROR]  npm ERR! Failed at the DroneCompanionApp@1.0.0 build script.
2019-06-04T02:50:45.686649096Z: [ERROR]  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-06-04T02:50:45.737627142Z: [ERROR]
2019-06-04T02:50:45.737645842Z: [ERROR]  npm ERR! A complete log of this run can be found in:
2019-06-04T02:50:45.737651042Z: [ERROR]  npm ERR!     /root/.npm/_logs/2019-06-04T02_50_45_650Z-debug.log
2019-06-04T02:50:45.777581965Z: [ERROR]  npm ERR! code ELIFECYCLE
2019-06-04T02:50:45.783756523Z: [ERROR]  npm ERR! errno 2
2019-06-04T02:50:45.803519586Z: [ERROR]  npm ERR! DroneCompanionApp@1.0.0 start: `npm run build && node src/backend/server.js`
2019-06-04T02:50:45.806689264Z: [ERROR]  npm ERR! Exit status 2
2019-06-04T02:50:45.813418717Z: [ERROR]  npm ERR!
2019-06-04T02:50:45.813449217Z: [ERROR]  npm ERR! Failed at the DroneCompanionApp@1.0.0 start script.
2019-06-04T02:50:45.832389286Z: [ERROR]  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
sugaroverflow commented 5 years ago

Decided to remove all sass and leave it to CSS