Hello,
I can't do anything with the CLI because my NPM is broken so it can't access the internet (EAI_AGAIN, I tried everything that is on Google), and every CLI command needs to download something (I don't know what) with NPM
For instance, if I type tns run android, I get this :
Copying template files...
Failed to retrieve data from npm. Please try again a little bit later.. Error: E
rror: getaddrinfo EAI_AGAIN registry.npmjs.eu:80
# run android
โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Usage โ Synopsis โ
โ Run on all โ $ tns run android [--key-store-path <File Path> --key โ
โ connected โ -store-password <Password> --key-store-alias <Name> - โ
โ devices and โ -key-store-alias-password <Password>] [--release] [- โ
โ running โ -justlaunch] โ
โ emulators โ โ
โ Run on a โ $ tns run android --device <Device ID> [--key-store-path โ
โ selected โ <File Path> --key-store-password <Password> --key-store โ
โ connected โ -alias <Name> --key-store-alias-password <Password>] [- โ
โ device or โ -release] [--justlaunch] โ
โ running โ โ
โ emulator โ โ
โ Start an โ $ tns run android --emulator [<Emulator Options>] [--key โ
โ emulator and โ -store-path <File Path> --key-store-password <Password> โ
โ run the app โ --key-store-alias <Name> --key-store-alias-password โ
โ inside it โ <Password>] [--release] [--justlaunch] โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Runs your project on a connected Android device or in a native Android emulator,
if configured. This is shorthand for prepare, build and deploy. While your app
is running, prints the output from the application in the console.
### Options
* --device - Specifies a connected device on which to run the app.
* --emulator - If set, runs the app in a native emulator for the target plat
form, if configured. When set, you can also set any other valid combination of e
mulator options as listed by $ tns help emulate android.
* --release - If set, produces a release build. Otherwise, produces a debug
build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) whic
h you want to use to code sign your APK. You can use the --key-store-* options a
long with --release to produce a signed release build. You need to specify all -
-key-store-* options.
* --key-store-password - Provides the password for the keystore file specifi
ed with --key-store-path. You can use the --key-store-* options along with --rel
ease to produce a signed release build. You need to specify all --key-store-* op
tions.
* --key-store-alias - Provides the alias for the keystore file specified wit
h --key-store-path. You can use the --key-store-* options along with --release t
o produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias-password - Provides the password for the alias specified
with --key-store-alias-password. You can use the --key-store-* options along wi
th --release to produce a signed release build. You need to specify all --key-st
ore-* options.
* --justlaunch - If set, does not print the application output in the consol
e.
### Attributes
* <Device ID> is the index or name of the target device as listed by $ tns d
evice android
* <Emulator Options> is any valid combination of options as listed by $ tns
help emulate android
Sending exception report (press Ctrl+C to stop).....
I installed tns-android with NPM with a local folder in my project but it still wants to install it...
Hello @p4ulolol
When executing tns run android what is essentially going on is that your app is trying to retreive all the dependencies and dev-dependencies described in your _package.json_ file and as those are npm dependencies it will fail if you don't have working node.js or don't have internet connection and your dependencies are not retreived from the source.
Keep in mind that every dependency in package.json may have additional own dependencies in its own package.json file.(For example your app has dependency on plugin-A, but plguin-A has dependencies on some other npm packets).
What version of Node.js are you using - consider using lastest stable release like v4.4.5
Also as suggested here this error is probably caused not by NPM but by a internet settings. Still this may be resolved when using a newer stable release of npm.
Also if you are using a proxy check your proxy setting and make sure you can reach https://registry.npmjs.org
I'm currently running Node v5.5.0 and npm 3.3.12. I know I have proxy problems (but I have no proxy !), etc., I'm still looking for a way to solve it. Proof I can join https://registry.npmjs.org/ :
{"db_name":"registry","doc_count":338899,"doc_del_count":356,"update_seq":2717965,"purge_seq":0,"compact_running":false,"disk_size":1553211515,"data_size":1287088580,"instance_start_time":"1465532520116000","disk_format_version":6,"committed_update_seq":2717965}
I also tried to re-install npm but that doesn't work (I'm now on 3.5.0)
@p4ulolol Some firewalls /anitvirus software can cause this behavour as well.
Try the following sollution:
Command to see your npm configuration settings
npm config list
or the full details with the key -l
npm config list -l
Additionally to set your npm registry explicitly use the following
npm config set registry http://registry.npmjs.org/
Hey, thanx, I don't know why, but I was using the npmjs.eu registry, which may no more work... I'm not sure (as I have other errors now) but I think you solved my biggest problem with NPM :smile:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.