Reputation: 11
I am trying to setup offline (does not have internet access) OS X machine for MobileFirst Platform 8.0 development, and failing to install MobileFirst CLI.
I am referring to this article.
I have installed 8.0.0.0-MFPF-DevKit-MacOSX-IF2016080923.zip
on the offline machine, then run.sh
and console.sh
.
Development server has successfully launched, and now I can access to Operations Console.
I have downloaded mfpdev-cli.tar
from the Console, and followed the article I cited above.
mfpdev-cli.tar
to online machine.npm --cache ./.cache install mfpdev-cli.tar
unarchive .cache directory
.sudo npm install --cache ./.cache ./mfpdev-cli.tar -g
Then, I got below:
npm ERR! fetch failed https://registry.npmjs.org/http-proxy/-/http-proxy-1.13.2.tgz
npm WARN retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
Those ERR!
and WARN
repeats for many other packages.
And at last:
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--cache" "./.cache" "./mfpdev-cli.tar" "-g"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! /Users/babatch/Downloads/mfpdev-cli/npm-debug.log
How do I install mfpdev-cli
on offline machine?
Upvotes: 1
Views: 740
Reputation: 11
I have tried some methods, and finally it got working.
The procedure is below:
npm install ./mfpdev-cli.tar
(without -g)cd node_modules
tar -cvzf mfpdev-cli.tgz mfpdev-cli
and copy mfpdev-cli.tgz just created to the offline machine.tar -xvzf mfpdev-cli.tgz
sudo cp -r mfpdev-cli /usr/local/lib/node_modules
cd /usr/local/bin
sudo ln -s ../lib/node_modules/mfpdev-cli/bin/cli.js ./mfpdev
At present, it seems to be working fine.
Upvotes: 0
Reputation: 44516
The problem is that npm is attempting to contact its online repository still due to some file dependency on the http-proxy package.
What you can do is to get/add this dependency independently and then try again.
Upvotes: 0