nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

npm install infinite build

Open Zatchou opened this issue 11 years ago • 32 comments

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 " <---- ...

Zatchou avatar Mar 11 '15 09:03 Zatchou

Can you try this link - it is from github repo, so it should work this time.

rosen-vladimirov avatar Mar 13 '15 10:03 rosen-vladimirov

Something like that ? :

PROXY_TO_FIDDLER: true, FIDDLER_HOSTNAME: 'my_proxy', (or 'http://my_proxy' ?) PROXY_PORT: 80

It didn't work for me.

Zatchou avatar Mar 13 '15 12:03 Zatchou

@Kyozatch, the project I've sent you doesn't respect PROXY_PORT option. I've prepared another package, you can download it from here After you install it, go to installation folder and find config file. In it you will find config.json file - fill in your details (PROXY_PORT, PROXY_HOSTNAME and set USE_PROXY to true) and try again.

Thank you very much!

rosen-vladimirov avatar Mar 13 '15 13:03 rosen-vladimirov

Very great job, it works !! I can create my project without any problem.

But now I meet a new kind of error when i want to add an android platform to my new project.

C:\Users\KNSD1821\projects\nstest>tns platform add android Copying template files... spawn cmd ENOENT

I'm still with nodejs 0.12.0. Should i downgrade to a 0.10.X ?

Zatchou avatar Mar 13 '15 13:03 Zatchou

Can you run your command once again by using --log trace: $ tns platform add android --log trace and send the output?

rosen-vladimirov avatar Mar 13 '15 13:03 rosen-vladimirov

And nativescript-cli should work fine with nodejs 0.12, so there's no need to downgrade your version :)

rosen-vladimirov avatar Mar 13 '15 13:03 rosen-vladimirov

Here i am :

"C:\Users\KNSD1821\projects\nstest>tns platform add android --log trace Starting watch on killswitch C:\Users\KNSD1821\AppData\Local\Temp\KNSD1821\KillS witches\cli AnalyticsInstallationID: de485939-95cf-448c-81d2-552c8d7a12a7 monitor not started monitor not started monitor has started, connecting to http://5752dabccfc54c4ab82aea9626b7338e.monit or-eqatec.com/json.ashx Looking for project in 'C:\Users\KNSD1821\projects\nstest' Project directory is 'C:\Users\KNSD1821\projects\nstest'. spawn: adb version Exec ant -version stdout: Apache Ant(TM) version 1.9.4 compiled on April 29 2014

stderr: Creating NativeScript project for the android platform Path: C:\Users\KNSD1821\projects\nstest\platforms\android Package: org.nativescript.nstest Name: nstest Copying template files... Using proxy with host: my_proxy, port: 80, path is: http://registry.npmjs.org/t ns-android User-Agent: AppBuilderCLI/0.9.1 (Node.js 0.12.0; win32; x64) httpRequest: { method: 'GET', host: 'my_proxy', port: 80, path: 'http://registry.npmjs.org/tns-android', headers: { Host: 'registry.npmjs.org', Accept: 'application/json; charset=UTF-8, /;q=0.8', 'User-Agent': 'AppBuilderCLI/0.9.1 (Node.js 0.12.0; win32; x64)', 'Accept-Encoding': 'gzip,deflate' } } httpRequest: Sending: [nothing] Statistics failed to be sent: 503 httpRequest: Done. code = 200 Statistics failed to be sent: 503 Exec android list targets

stdout: Available Android targets:

id: 1 or "android-15" Name: Android 4.0.3 Type: Platform API level: 15 Revision: 5 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800

Tag/ABIs : default/armeabi-v7a, default/x86

id: 2 or "android-19" Name: Android 4.4.2 Type: Platform API level: 19 Revision: 4 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in

Tag/ABIs : default/armeabi-v7a, default/x86

id: 3 or "android-21" Name: Android 5.0.1 Type: Platform API level: 21 Revision: 2 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in

Tag/ABIs : no ABIs.

id: 4 or "Google Inc.:Google APIs:15" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 2 Description: Android + Google APIs Based on Android 4.0.3 (API level 15) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800

Tag/ABIs : default/armeabi-v7a

id: 5 or "Google Inc.:Google APIs:19" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 10 Description: Android + Google APIs Based on Android 4.4.2 (API level 19) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in

Tag/ABIs : default/armeabi-v7a

id: 6 or "Google Inc.:Google APIs (x86 System Image):19" Name: Google APIs (x86 System Image) Type: Add-On Vendor: Google Inc. Revision: 10 Description: Android x86 + Google APIs Based on Android 4.4.2 (API level 19) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in

Tag/ABIs : default/x86

id: 7 or "Google Inc.:Google APIs:21" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 1 Description: Android + Google APIs Based on Android 5.0.1 (API level 21) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in Tag/ABIs : google_apis/x86

stderr: 'xcopy' n'est pas reconnu en tant que commande interne ou externe, un programme ex?cutable ou un fichier de commandes.

Android target: android-21 spawn: cmd /s /c android update project --path C:\Users\KNSD1821\projects\nstest \platforms\android --target android-21 --name nstest spawn cmd ENOENT "

Seems like "xcopy" is an unknow function. (french logs sorry :P )

Zatchou avatar Mar 13 '15 13:03 Zatchou

Can you try executing android command on your console, just write $ android I suspect you do not have platform-tools and tools directories from Android SDK added to your PATH. Please note that this is one of our system requirement - check step 5. Installing Android SDK for correct setup.

rosen-vladimirov avatar Mar 13 '15 13:03 rosen-vladimirov

You're right, $ android doesn't work, but my path looks correct.

PATH : C:\Users\KNSD1821\AppData\Roaming\npm;%JAVA_HOME%\bin;C:\ProgramData\Oracle\Java\javapath;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;%ANT_HOME%\bin;C:\Program Files\nodejs\

ANDROID_HOME : C:\Users\KNSD1821\AppData\Local\Android\sdk

Zatchou avatar Mar 13 '15 14:03 Zatchou

Hi @Kyozatch

We've checked this error - in android.bat file inside ANDROID_HOME\tools, there's a call to xcopy. It looks like for some reason you do not have xcopy. As this tool is part of Windows installation, I'm not sure how we can help you in this case. On my machine the xcopy is under C:\Windows\System32 directory. Also you can try executing $ echo %PATH% on your console and you'll see the correct resolved paths. See if C:\Windows\System32 is part of your path and if there's xcopy in the specified dir.

rosen-vladimirov avatar Mar 13 '15 14:03 rosen-vladimirov

I don't know why, but my path to System32 has been delete. So now everything works good ! Thanks you so much for your assistance @rosen-vladimirov !!! You're a prince. I look forward to start to code :)

Zatchou avatar Mar 13 '15 15:03 Zatchou

Hi @Kyozatch, I'm glad we've finally succeeded. We wouldn't make it without your help. Hope you'll like NativeScript :)

rosen-vladimirov avatar Mar 13 '15 16:03 rosen-vladimirov