Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hang on Downloading Distribution Files #90

Closed
Queuecumber opened this issue Jul 13, 2017 · 7 comments
Closed

Hang on Downloading Distribution Files #90

Queuecumber opened this issue Jul 13, 2017 · 7 comments

Comments

@Queuecumber
Copy link

I have a project that builds with cmake-js and when setting it up on a new machine I am getting a hang on the "Downloading Distribution Files" step, I turned on silly logging to attempt to debug it but it gave no extra information for that step. Here is the dump. I can wget the file that it is talking about just fine so I dont know why it would be hanging. Did something change with the URLs?

sill CON argv:
sill CON { _: [ 'build' ],
sill CON   version: false,
sill CON   h: false,
sill CON   help: false,
sill CON   D: false,
sill CON   debug: false,
sill CON   m: false,
sill CON   'prefer-make': false,
sill CON   preferMake: false,
sill CON   x: false,
sill CON   'prefer-xcode': false,
sill CON   preferXcode: false,
sill CON   g: false,
sill CON   'prefer-gnu': false,
sill CON   preferGnu: false,
sill CON   C: false,
sill CON   'prefer-clang': false,
sill CON   preferClang: false,
sill CON   o: false,
sill CON   prec11: false,
sill CON   i: false,
sill CON   silent: false,
sill CON   l: 'silly',
sill CON   'log-level': 'silly',
sill CON   logLevel: 'silly',
sill CON   '$0': 'cmake-js',
sill CON   d: undefined,
sill CON   c: undefined,
sill CON   G: undefined,
sill CON   s: undefined,
sill CON   r: undefined,
sill CON   v: undefined,
sill CON   a: undefined,
sill CON   CD: undefined,
sill CON   O: undefined }
verb CON Parsing arguments
verb CON options:
verb CON { directory: null,
verb CON   debug: false,
verb CON   cmakePath: null,
verb CON   generator: undefined,
verb CON   preferMake: false,
verb CON   preferXcode: false,
verb CON   preferGnu: false,
verb CON   preferClang: false,
verb CON   std: null,
verb CON   runtime: undefined,
verb CON   runtimeVersion: undefined,
verb CON   arch: undefined,
verb CON   cMakeOptions: {},
verb CON   silent: false,
verb CON   out: undefined }
verb CON Running command: build
verb CFG Looking for application level CMake.js config in '/data/user_storage/kilho/fivr3/Source.
sill CFG Looking for package.json in: '/data/user_storage/kilho/fivr3/Source/package.json'.
sill CFG Loaded:
sill CFG {"name":"FIVR3","description":"FIVR 3 System","version":"3.0.6","private":true,"dependencies":{"array.prototype.find":"^1.0.0","basic-auth":"^1.0.0","bindings":"^1.2.1","bluebird":"^2.9.13","body-parser":"^1.12.0","bull":"^0.2.7","bunyan":"^0.21.4","bunyan-prettystream":"^0.1.3","cmake-js":"^3.3.1","colors":"^1.1.2","commander":"^2.9.0","config":"^0.4.37","connect-redis":"^2.2.0","cookie-parser":"^1.3.4","express":"^4.0.0","express-session":"~1.0.3","fluent-ffmpeg":"^2.1.0","jsonschema":"^1.0.0","mkdirp":"^0.5.0","multer":"^0.1.8","nan":"^2.0.9","node-uuid":"^1.4.3","opencv":"queuecumber/node-opencv","promise":"~6.0.0","redis":"~0.12.1","temp":"^0.8.3","uuid":"^2.0.1"},"scripts":{"install":"cmake-js build","configure":"cmake-js configure","build":"cmake-js build","clean":"cmake-js clean","doc":"cd ../Doc && ./gendoc.sh","lint":"jshint --exclude node_modules .","package":"cd ../Package && ./package.sh","start":"./start.sh","system":"./start.sh system","web":"./start.sh web"},"jshintConfig":{"curly":true,"eqeqeq":true,"strict":true,"undef":true,"unused":true,"esnext":true,"node":true,"predef":["-Promise"]}}
sill CFG Config not found.
sill CFG Looking for parent path.
sill CFG Parent path: '/data/user_storage/kilho/fivr3'.
sill CFG Looking for package.json in: '/data/user_storage/kilho/fivr3/package.json'.
sill CFG 'package.json' not found.
sill CFG Looking for parent path.
sill CFG Parent path: '/data/user_storage/kilho'.
sill CFG Looking for package.json in: '/data/user_storage/kilho/package.json'.
sill CFG 'package.json' not found.
sill CFG Looking for parent path.
sill CFG Parent path: '/data/user_storage'.
sill CFG Looking for package.json in: '/data/user_storage/package.json'.
sill CFG 'package.json' not found.
sill CFG Looking for parent path.
sill CFG Parent path: '/data'.
sill CFG Looking for package.json in: '/data/package.json'.
sill CFG 'package.json' not found.
sill CFG Looking for parent path.
sill CFG Parent path: '/'.
sill CFG Looking for package.json in: '/package.json'.
sill CFG 'package.json' not found.
sill CFG Looking for parent path.
sill CFG Parent path with package.json file doesn't exists. Done.
verb CFG Application level CMake.js config doesn't exists.
verb CFG Build system options:
verb CFG {"directory":"/data/user_storage/kilho/fivr3/Source","debug":false,"cmakePath":null,"preferMake":false,"preferXcode":false,"preferGnu":false,"preferClang":false,"std":null,"cMakeOptions":{},"silent":false}
info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info DIST Downloading distribution files.
http DIST       - http://nodejs.org/dist/v6.11.1/SHASUMS256.txt
@smkanadl
Copy link

I have a similar issue. In my case it is a corporate proxy which blocks the calls made by the http client from the 'request' module. Any chance we can get a proxy setting for cmake-js?

@jwater7
Copy link

jwater7 commented Jul 17, 2018

This bug is making it impossible for me to upgrade also. Why are the "distribution files" not packaged with the node module? I suppose every version would make the package large, but there needs to be a way to use this offline. Maybe if they are already on the system then don't attempt to download? Or maybe pass it an optional url as an argument?
A proxy variable will not work for us since we use Artifactory to mirror npms inside a private offline network. We could host the distribution files there too if we could point cmake to them somehow.

@jwater7
Copy link

jwater7 commented Jul 18, 2018

Update: I may have found a workaround - you can manually set up the "~/.cmake-js" directory with the extracted node headers and then cmake-js won't try to go and download them if they are already there.

@milandashara
Copy link

i am also facing same issue..

@unbornchikken
Copy link
Member

You should put a package.json file in you module / project directory to make CMake.js work as expected. Let me know if it helps.

@gilly3
Copy link

gilly3 commented Jan 4, 2020

In node-gyp, you can specify a --nodedir path where distribution files can be found locally. So, since I already have that set up in my .npmrc file, I created a symlink to that location for cmake-js on my server that does not have internet access:

$ mkdir -p ~/.cmake-js/node-x64/$(node -v)
$ ln -s $(npm get nodedir)/include ~/.cmake-js/node-x64/$(node -v)/include

It would be nice if this were made an official feature of cmake-js, and documented.

@Julusian
Copy link
Collaborator

Julusian commented May 9, 2022

The downloading logic was replaced a while ago with axios, so the behaviour here may have changed.
It still doesnt support proxies #185, but an offline mode has been added #260.
I dont think this issue covers anything more than those other two, so I shall close this

@Julusian Julusian closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants