npm install infinite build
Hi,
I'm trying to install nativescript but each time (whatever the nodejs version) it fails because i never pass this line (even after 20min..). I currently use nodejs 0.10.36.
" npm WARN deprecated [email protected]: critical bug fixed in v4.2.0 npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m odules/highlight.js/src/styles/solarized_light.css npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m odules/highlight.js/src/styles/solarized_light.css npm WARN excluding symbolic link docs\assets\ir_black.css -> ../../node_modules/ highlight.js/src/styles/ir_black.css npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m odules/highlight.js/src/styles/solarized_light.css |
[email protected] install C:\Users\Test\AppData\Roaming\npm\node_modules\native script\node_modules\fibers node ./build.js " <---- ...
Hi @Kyozatch ,
This is really strange. I assume you are working on Windows, am I right? Could you try executing $npm install nativescript --verbose and send the output? Are you using 32-bit or 64-bit node?
Yes you are right, windows. Node 64-bit.
This is a part of last ouputs :
npm verb tar unpack C:\Users\KNSD1821\AppData\Roaming\npm-cache\debug\2.1.2\pack age.tgz npm verb lock tar://C:\Users\KNSD1821\myApp\node_modules\nativescript\node_modul es\ref-struct\node_modules\debug C:\Users\KNSD1821\AppData\Roaming\npm-cache\2a7 b36c2-es-ref-struct-node-modules-debug.lock npm verb lock tar://C:\Users\KNSD1821\AppData\Roaming\npm-cache\debug\2.1.2\pack age.tgz C:\Users\KNSD1821\AppData\Roaming\npm-cache\fe2edf10-pm-cache-debug-2-1- 2-package-tgz.lock npm info preinstall [email protected] npm info preinstall [email protected] npm info preinstall [email protected] npm info preinstall [email protected] npm info preinstall [email protected] npm verb readDependencies using package.json deps npm verb readDependencies using package.json deps npm verb readDependencies using package.json deps npm verb readDependencies using package.json deps npm verb readDependencies using package.json deps npm verb readDependencies using package.json deps npm verb readDependencies using package.json deps npm verb about to build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_m odules\log4js\node_modules\semver npm info build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_modules\lo g4js\node_modules\semver npm verb linkStuff [ false, npm verb linkStuff false, npm verb linkStuff false, npm verb linkStuff 'C:\Users\KNSD1821\myApp\node_modules\nativescript\no de_modules\log4js\node_modules' ] npm info linkStuff [email protected] npm verb linkBins [email protected] npm verb link bins [ { semver: './bin/semver' }, npm verb link bins 'C:\Users\KNSD1821\myApp\node_modules\nativescript\no de_modules\log4js\node_modules.bin', npm verb link bins false ] npm verb linkMans [email protected] npm verb rebuildBundles [email protected] npm verb readDependencies using package.json deps npm verb about to build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_m odules\log4js\node_modules\async npm info build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_modules\lo g4js\node_modules\async npm verb linkStuff [ false, npm verb linkStuff false, npm verb linkStuff false, npm verb linkStuff 'C:\Users\KNSD1821\myApp\node_modules\nativescript\no de_modules\log4js\node_modules' ] npm info linkStuff [email protected] npm verb linkBins [email protected] npm verb linkMans [email protected] npm verb rebuildBundles [email protected] npm verb readDependencies using package.json deps npm verb about to build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_m odules\unzip\node_modules\match-stream\node_modules\buffers npm info build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_modules\un zip\node_modules\match-stream\node_modules\buffers npm verb linkStuff [ false, npm verb linkStuff false, npm verb linkStuff false, npm verb linkStuff 'C:\Users\KNSD1821\myApp\node_modules\nativescript\no de_modules\unzip\node_modules\match-stream\node_modules' ] npm info linkStuff [email protected] npm verb linkBins [email protected] npm verb linkMans [email protected] npm verb rebuildBundles [email protected] npm verb readDependencies using package.json deps npm verb about to build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_m odules\fibers npm info build C:\Users\KNSD1821\myApp\node_modules\nativescript\node_modules\fi bers npm verb linkStuff [ false, npm verb linkStuff false, npm verb linkStuff false, npm verb linkStuff 'C:\Users\KNSD1821\myApp\node_modules\nativescript\no de_modules' ] npm info linkStuff [email protected] npm verb linkBins [email protected] npm verb linkMans [email protected] npm verb rebuildBundles [email protected] npm info install [email protected] npm info install [email protected] npm verb cache add [ '[email protected]', null ] npm verb cache add name=undefined spec="[email protected]" args=["[email protected]",null] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '[email protected]', npm verb parsed url path: '[email protected]', npm verb parsed url href: '[email protected]' } npm verb cache add [ '[email protected]', null ] npm verb cache add name=undefined spec="[email protected]" args=["[email protected]",null] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '[email protected]', npm verb parsed url path: '[email protected]', npm verb parsed url href: '[email protected]' } npm verb cache add [ '[email protected]', null ] npm verb cache add name=undefined spec="[email protected]" args=["[email protected]",null] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '[email protected]', npm verb parsed url path: '[email protected]', npm verb parsed url href: '[email protected]' } npm verb cache add [ '[email protected]', null ] npm verb cache add name=undefined spec="[email protected]" args=["[email protected]",nul l] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '[email protected]', npm verb parsed url path: '[email protected]', npm verb parsed url href: '[email protected]' } npm verb cache add [ '[email protected]', null ] npm verb cache add name=undefined spec="[email protected]" args=["[email protected]",nul l] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '[email protected]', npm verb parsed url path: '[email protected]', npm verb parsed url href: '[email protected]' } npm verb cache add [ '[email protected]', null ] npm verb cache add name=undefined spec="[email protected]" args=["stack-trace@0. 0.x",null] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '[email protected]', npm verb parsed url path: '[email protected]', npm verb parsed url href: '[email protected]' } npm info install [email protected] npm verb cache add name="async" spec="0.1.x" args=["async","0.1.x"] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '0.1.x', npm verb parsed url path: '0.1.x', npm verb parsed url href: '0.1.x' } npm verb addNamed [ 'async', '0.1.x' ] npm verb addNamed [ null, '>=0.1.0-0 <0.2.0-0' ] npm verb lock [email protected] C:\Users\KNSD1821\AppData\Roaming\npm-cache\463e1c03-a sync-0-1-x.lock npm verb cache add name="cycle" spec="1.0.x" args=["cycle","1.0.x"] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '1.0.x', npm verb parsed url path: '1.0.x', npm verb parsed url href: '1.0.x' } npm verb addNamed [ 'cycle', '1.0.x' ] npm verb addNamed [ null, '>=1.0.0-0 <1.1.0-0' ] npm verb lock [email protected] C:\Users\KNSD1821\AppData\Roaming\npm-cache\dfb63733-c ycle-1-0-x.lock npm verb cache add name="eyes" spec="0.1.x" args=["eyes","0.1.x"] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '0.1.x', npm verb parsed url path: '0.1.x', npm verb parsed url href: '0.1.x' } npm verb addNamed [ 'eyes', '0.1.x' ] npm verb addNamed [ null, '>=0.1.0-0 <0.2.0-0' ] npm verb lock [email protected] C:\Users\KNSD1821\AppData\Roaming\npm-cache\81039dce-ey es-0-1-x.lock npm verb cache add name="pkginfo" spec="0.2.x" args=["pkginfo","0.2.x"] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '0.2.x', npm verb parsed url path: '0.2.x', npm verb parsed url href: '0.2.x' } npm verb addNamed [ 'pkginfo', '0.2.x' ] npm verb addNamed [ null, '>=0.2.0-0 <0.3.0-0' ] npm verb lock [email protected] C:\Users\KNSD1821\AppData\Roaming\npm-cache\f898f07d -pkginfo-0-2-x.lock npm verb cache add name="request" spec="2.9.x" args=["request","2.9.x"] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '2.9.x', npm verb parsed url path: '2.9.x', npm verb parsed url href: '2.9.x' } npm verb addNamed [ 'request', '2.9.x' ] npm verb addNamed [ null, '>=2.9.0-0 <2.10.0-0' ] npm verb lock [email protected] C:\Users\KNSD1821\AppData\Roaming\npm-cache\0258777d -request-2-9-x.lock npm verb cache add name="stack-trace" spec="0.0.x" args=["stack-trace","0.0.x"] npm verb parsed url { protocol: null, npm verb parsed url slashes: null, npm verb parsed url auth: null, npm verb parsed url host: null, npm verb parsed url port: null, npm verb parsed url hostname: null, npm verb parsed url hash: null, npm verb parsed url search: null, npm verb parsed url query: null, npm verb parsed url pathname: '0.0.x', npm verb parsed url path: '0.0.x', npm verb parsed url href: '0.0.x' } npm verb addNamed [ 'stack-trace', '0.0.x' ] npm verb addNamed [ null, '>=0.0.0-0 <0.1.0-0' ] npm verb lock [email protected] C:\Users\KNSD1821\AppData\Roaming\npm-cache\00b1 025d-stack-trace-0-0-x.lock
[email protected] install C:\Users\KNSD1821\myApp\node_modules\nativescript\node_mo dules\fibers node ./build.js
Hi @Kyozatch
I've checked this script and tried installing nativescript-cli on my Windows 8 machine and everything worked fine. The only idea I have is to try executing fiber's build script manually and see what's going on. Just go to C:\Users\KNSD1821\myApp\node_modules\nativescript\node_mo
dules\fibers and execute on your console node ./build.js
If it stays this way for a long time, you can try opening build.js and place some console.log("smth") on several places in it and execute it again. This way we'll get more information on which step the execution is taking a lot of time (or failing silently).
Bingo.
"
C:\Users\KNSD1821\myApp>node C:\Users\KNSD1821\myApp\node_modules\nativescript\n
ode_modules\fibers\build.js
//---BEGIN---//
//---BEFORE PARSE ARGS---//
//---BEFORE TEST PRE-BUILD---//
win32-x64-v8-3.14 exists; testing
//---BEFORE BUILD()---//
//---BEFORE AFTER_BUILD()---//
//---END---//
Problem with the binary; manual build incoming "
...and the script freeze.
Hm, this is really strange. We've prebuilt node-fibers and the binary win32-x64-v8-3.14 is fine on our side. I have some ideas, that could help.
First of all, can you try removing your npm-cache (it should be under: C:\Users\KNSD1821\AppData\Roaming\npm-cache) and try installing nativescript again.
If this doesn't help, can you try installing only fibers in any folder, just execute:
npm i https://github.com/icenium/node-fibers/tarball/v1.0.5.1
After that, you should see node_modules directory on the place where you've installed the fibers, navigate to it and try executing node build.js from this directory. nativescript-cli installs fibers in the same way.
If this fails again, could you try installing 32-bit version of nodejs and see if it will work for you.
Also it will be great if you can send the output of node --version and npm --version
Thank you very much for your cooperation. I'm looking forward to hearing from you.
Cache cleaned doesn't change
but i installed only fibers, and the build.js works :
"
C:\Users\KNSD1821\node_modules\fibers>node build.js
win32-x64-v8-3.14 exists; testing
Binary is fine; exiting "
Should I replace the folder, then ?
Thanks you (!) for your assistance.
I'm not sure how you would replace it and use it in nativescript-cli installation. You can try the following:
npm cache clean
npm uninstall -g nativescript
npm install -g nativescript
If the installation fails, you can try replacing fibers folder inside nativescript's node_modules directory. After that, in nativescript's root folder execute npm install. This will take all dependencies from package.json and install them in node_modules. If they are already there, I assume they will not be replaced.
Hope this will make it. As we would like to find out the cause of the issue, could you share your npm version: the output of npm --version should be enough.
It doesn't work. My npm version : 1.4.28
Hi @Kyozatch , I've just found some links related to similar problem with 1.x version of npm. I've also discussed the issue with some of my colleagues and they've mentioned that they've seen such issue (not exactly with fibers installation, but with other node modules). The solution in most of the cases is to update npm. The easiest way here is to try another node version. Could you install nodejs 0.12.0 and try installing nativescript again. I'm looking forward to hearing from you.
Hi @rosen-vladimirov, Sorry i had to go yesterday.
If i downgraded my nodejs version to 0.10.X it's because i thought it was recommanded. The second reason : i have a failure after tns create tnstest :
C:\Users\KNSD1821>tns create tnstest Failed to retrieve data from npm. Please try again a little bit later.. Error: E rror: connect ECONNREFUSED
Is it a proxy problem ? I don't think so, i already set proxy variable which works with everything.
BTW, my outputs after a npm i -g nativescript with nodejs v.0.12.0 :
C:\Users\KNSD1821>npm i -g nativescript npm WARN deprecated [email protected]: critical bug fixed in v4.2.0 npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m odules/highlight.js/src/styles/solarized_light.css npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m odules/highlight.js/src/styles/solarized_light.css npm WARN excluding symbolic link docs\assets\ir_black.css -> ../../node_modules/ highlight.js/src/styles/ir_black.css npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: { "node":"0.12.0","npm":"2.5.1"})
[email protected] install C:\Users\KNSD1821\AppData\Roaming\npm\node_modules\native script\node_modules\fibers node ./build.js
win32-x64-v8-3.28 exists; testing
Binary is fine; exiting
npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m
odules/highlight.js/src/styles/solarized_light.css
npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
\Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
\Test Framework -> Versions/Current/Test Framework
npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
\Versions\Current -> A
[email protected] install C:\Users\KNSD1821\AppData\Roaming\npm\node_modules\nativescr ipt\node_modules\ref node ./build.js
win32-x64-v8-3.28 exists; testing
Binary is fine; exiting
npm WARN excluding symbolic link docs\assets\ir_black.css -> ../../node_modules/
highlight.js/src/styles/ir_black.css
npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
\Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
\Test Framework -> Versions/Current/Test Framework
npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
\Versions\Current -> A
npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m
odules/highlight.js/src/styles/solarized_light.css
[email protected] install C:\Users\KNSD1821\AppData\Roaming\npm\node_modules\nativescr ipt\node_modules\node-inspector\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\KNSD1821\AppData\Roaming\npm\node_modules\nativescript\node_modules\nod e-inspector\node_modules\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\n ode-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m odules/highlight.js/src/styles/solarized_light.css
[email protected] install C:\Users\KNSD1821\AppData\Roaming\npm\node_modules\nativescr ipt\node_modules\ffi node ./build.js
win32-x64-v8-3.28 exists; testing
Binary is fine; exiting
C:\Users\KNSD1821\AppData\Roaming\npm\tns -> C:\Users\KNSD1821\AppData\Roaming\n
pm\node_modules\nativescript\bin\nativescript.js
C:\Users\KNSD1821\AppData\Roaming\npm\nativescript -> C:\Users\KNSD1821\AppData
Roaming\npm\node_modules\nativescript\bin\nativescript.js
[email protected] postinstall C:\Users\KNSD1821\AppData\Roaming\npm\node_modu les\nativescript node postinstall.js
stdout: Restart your shell to enable command auto-completion.
[email protected] C:\Users\KNSD1821\AppData\Roaming\npm\node_modules\nativescri pt ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ├── [email protected] ([email protected], [email protected], through2@0. 2.3) ├── [email protected] ([email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], m [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], wi [email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], xmlbuilde [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], s [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected]) └── [email protected] "
Don't know if it can be useful.
EDIT : I tried last night to create a project on an other windows 8.1 with nodejs 0.12.0 and it works.. so the problem is probably this computer.
Hi @Kyozatch
Thanks for sending the log. It indicates that the installation is correct this time. The problem with create command is different, but I believe it is caused by the same reason - it looks like there are some limitations on your machine when connecting to npm and sometimes you are unable to install the packages or they are not fully downloaded. When you create new project, we execute npm install tns-template-hello-world and this is the operation that's failing. As you've seen, the error is ECONNREFUSED, which is nodejs's error for unable to connect. Also npmjs is not the most stable one, so sometimes you'll see this error and the solution is really to try again in 2-3 minutes. Have you tried? If this doesn't help, can you try npm install tns-template-hello-world? If it passes, you can try
tns create test1 --copy-from <path to installation dir of tns-template-hello-world>
That's ok. But then, I tried tns platform add android and got :
Copying template files...
Failed to retrieve data from npm. Please try again a little bit later.. Error: E
rror: connect ECONNREFUSED
It seems that, this problem will always block me somewhere, whatever if i downoald directly the android platform.
I've checked our code and before installing the required package from npm, we make http call to http://registry.npmjs.org/ to check the latest version of the package. I assume these calls are failing on your side (as npm install outside of nativescript-cli is working for you). Can you try opening http://registry.npmjs.org/tns-android from your browser and see if you receive result (it should be JSON). Maybe there's a problem with your ironport or machine configuration for accessing registry.npmjs.org
No problems. Page full of json.
Is it possible that nativescript or npm would have some difficulties when using a corporate's proxy ? It's weird...
Hi @Kyozatch, well npm should be configured in order to work correctly when a corporate proxy is in use. Please take a look at this blog post Can you try the commands mentioned there and see if it will work for you?
That's exactly the website i consulted to param npm.. Actually I've no more ideas to solve the problem.
Hi @Kyozatch
May I ask you one last thing (once again, thank you very much for your cooperation). Can you try installing this custom package of nativescript-cli. Just download the file and execute:
$ npm i nativescript-0.9.1.tgz -g
After the installation finishes, find the place where nativescript is installed and open <nativescript-cli-dir>\lib\config.js and modify FIDDLER_HOSTNAME to match your proxy.
After that can you try creating new project and adding platforms, so we'll see if this works. We are working on adding support for proxy, but we'll be really greatful if you can test this approach on your side and inform us if it works.
One more thing, the package I've shared is created from this branch, so you can compare it with our latest release branch to see my changes - they are only in the config file.
Ok I understand now. When i just try do download this custom package, i have a ERR_CONNECTION_REFUSED. If you use dropbox as cloud, i can't make any download because my corporate block this website. So the problem comes from here ! :)
Hi @Kyozatch No, we do not use dropbox for backend. I've used it just to upload this package in my own dropbox. I'll try to upload it on another place, so you can take the package and try it on your side.