node-sass: Post-install build.js fails
I’m attempting to install node-sass as a dependency of an advanced ng2/electron seed inside a Docker container running behind a corporate firewall controlled by a Jenkins CI instance.
NPM version (
npm -v
): 3.10.8Node version (
node -v
): v6.9.1Node Process (
node -p process.versions
): { http_parser: ‘2.7.0’, node: ‘6.9.1’, v8: ‘5.1.281.84’, uv: ‘1.9.1’, zlib: ‘1.2.8’, ares: ‘1.10.1-DEV’, icu: ‘57.1’, modules: ‘48’, openssl: ‘1.0.2j’ }Node Platform (
node -p process.platform
): linuxNode architecture (
node -p process.arch
): x64node-sass version (
node -p "require('node-sass').info"
):npm node-sass versions (
npm ls node-sass
): not applicable, attempting to install v4.1.1
This is the relevant part of the respective Dockerfile, it is build from node:6.9.1 which is itself based on Debian Jessie.
ENV SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=1 ENV SASS_BINARY_PATH=/usr/base/binaries/ ENV SASS_BINARY_NAME=linux-x64-48 COPY ./ /usr/base
The correct copy process of the binary has been confirmed.
The installation process fails during the postinstall call to build.js:
node-sass@4.1.1 postinstall /usr/base/node_modules/node-sass node scripts/build.js
Binary found at /usr/base/binaries/
Testing binary
Binary has a problem: { Error: Cannot find module ‘/usr/base/binaries/’ at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at module.exports (/usr/base/node_modules/node-sass/lib/binding.js:19:10) at Object.<anonymous> (/usr/base/node_modules/node-sass/lib/index.js:14:35) at Module._compile (module.js:570:32) at Object.Module._extensions…js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) code: ‘MODULE_NOT_FOUND’ }
Building the binary locally
Building: /usr/local/bin/node /usr/base/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
The following local compilation via node-gyp fails, again because the following GET is blocked by a firewall:
GET https://nodejs.org/download/release/v6.9.1/node-v6.9.1-headers.tar.gz
While this isn’t really the problem, I’m also open to workarounds based on supplying cached node header files to node-gyp.
Any ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 17 (8 by maintainers)
Any updates?
I have created a gist containing the complete install log along with the used Dockerfiles, thanks for your efforts.
http://gist.github.com/TekSiDoT/0904eb396e50685c6c8e22540660c461