0

I have installed nodejs with npm, appium guhub package.

My machine does not has Internet connection

How do I use npm to install the appium?

Npm install -g appium

Is not working.

guo
  • 121
  • 3
  • 11
  • Basically your question is not about Appium, but [how to install npm package while offline](https://stackoverflow.com/questions/43064107/how-to-install-npm-package-while-offline). – dmle Mar 01 '21 at 14:31

1 Answers1

0

Try with this steps

  • Create package.json file using npm-init command

  • list all the modules in package.json that you need

  • Run npm-install on your terminal

full reference : https://docs.npmjs.com/cli/v7/configuring-npm/package-json

Dinesh s
  • 313
  • 4
  • 19
  • i am not sure this "Create package.json file using npm-init command" , because the appium package downloaded from github https://github.com/appium/appium already has this file. – guo Mar 01 '21 at 05:30
  • are you downloaded the full repo of appium? – Dinesh s Mar 01 '21 at 05:44
  • Yes I downloaded full repo of appium. – guo Mar 01 '21 at 08:14
  • for working with appium in nodejs why you download the repo ? – Dinesh s Mar 01 '21 at 10:22
  • without downloading repo create one new folder and in the terminal of the foder run`npm init` command it will give you a json file after that follow the steps mentioned in answer it though that you can use the appium package in node js – Dinesh s Mar 01 '21 at 10:25
  • I need to install the appium command line version (not desktop UI version) that's my objective. From user guide, I need to run command npm install but my machine isn't Internet machine. So my question is how do I proceed. Your answer isn't clear to me as I'm not sure why I need create package. The github appium has it already. I cannot make use of it? Then last step of your answer is run npm-install. This isn't npm command. The correct one is npm install. Sorry that your answer is not right. – guo Mar 02 '21 at 09:35
  • Did you visit gihubt appium repo see thru the files. There is package.json. All modules was there. Npm install command isn't run if I cmd to the repo path and run npm install appium command. – guo Mar 02 '21 at 09:53