force build from source for selected dep


(Sols Ti Ce D'hiver) #1

hi.
I am trying to build flood-git (https://github.com/jfurrow/flood) package on archlinux-arm.

The build fails because node-sass does not support the arm architecture. But one can build it anyway manually with a npm run build.

How can I specify that node-sass to be built from source in the “global” flood package.json ?

Moreoever, there is an error about geoip-country-only@1.1.8 postinstall script but I found no such packge or script in node_modules ???

Here are the errors:

> node-sass@4.9.0 install /mnt/miniNAS/tmp/flood-git/src/flood/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/linux-arm-67_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/linux-arm-67_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> uglifyjs-webpack-plugin@0.4.6 postinstall /mnt/miniNAS/tmp/flood-git/src/flood/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> geoip-country-only@1.1.8 postinstall /mnt/miniNAS/tmp/flood-git/src/flood/node_modules/geoip-country-only
> npm run-script updatedb


> geoip-country-only@1.1.8 updatedb /mnt/miniNAS/tmp/flood-git/src/flood/node_modules/geoip-country-only
> node scripts/updatedb.js

fs.js:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at fs.js:25:1
    at req_ (/mnt/miniNAS/tmp/flood-git/src/flood/node_modules/natives/index.js:137:5)
    at Object.req [as require] (/mnt/miniNAS/tmp/flood-git/src/flood/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/mnt/miniNAS/tmp/flood-git/src/flood/node_modules/fstream/node_modules/graceful-fs/fs.js:1:99)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! geoip-country-only@1.1.8 updatedb: `node scripts/updatedb.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the geoip-country-only@1.1.8 updatedb 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/alarm/.npm/_logs/2018-11-22T19_59_55_989Z-debug.log
npm WARN flood@1.0.0 No repository field.
npm WARN flood@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! geoip-country-only@1.1.8 postinstall: `npm run-script updatedb`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the geoip-country-only@1.1.8 postinstall 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/alarm/.npm/_logs/2018-11-22T20_00_08_346Z-debug.log
==> ERROR: A failure occurred in prepare().

(Sols Ti Ce D'hiver) #3

OK.
the built works better when using node v10 LTS instead of v11.


(system) #4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.