arei / npmbox

Utility for creating (boxing) and using (unboxing) an archive of a complete (including all dependencies) npm install.
MIT License
245 stars 34 forks source link

Offline install not working - always trying to connect to npmjs.org #23

Closed jeffjasper closed 9 years ago

jeffjasper commented 9 years ago

I am having an ENOTFOUND issue installing npmbox on both mac and windows offline machines. I have followed the offline install directions. The connected machine is running npm 2.5 with npmbox 2.1.1 installed. The offline servers are running npm 2.5. Based on the output, it looks like it is trying to hit https://registry.npmjs.org/npmbox. Am I missing something to get it to use the cache directory?

details: When running sudo npm install --global --cache ./.npmbox.cache --optional --cache-min 99999 --verbose npmbox", here is the output

npm info it worked if it ends with ok
npm verb cli [ 'node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   '--global',
npm verb cli   '--cache',
npm verb cli   './.npmbox.cache',
npm verb cli   '--optional',
npm verb cli   '--cache-min',
npm verb cli   '99999',
npm verb cli   '--verbose',
npm verb cli   'npmbox' ]
npm info using npm@2.5.0
npm info using node@v0.10.36
npm verb cache add spec npmbox
npm verb addNamed npmbox@*
npm verb addNameRange registry:https://registry.npmjs.org/npmbox not in flight; fetching
npm verb request uri https://registry.npmjs.org/npmbox
npm verb request no auth needed
npm info attempt registry request try #1 at 09:58:54
npm verb request id 3164c309a3269a80
npm http request GET https://registry.npmjs.org/npmbox
npm info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
arei commented 9 years ago

For whatever reason npm is not seeing the cache folder or the contents (specifically npmbox) inside the cache folder.

1). Did you untar the npmbox.npmbox file into the current directory such that ./.npmbox.cache exists? 2). Does .npmbox.cache have a ton of stuff in it including directories for npmbox? 3). Does root have permission to see inside of .npmbox.cache? 4). Did you npmbox npmbox using an older version of npmbox? (The .npmbox.cache folder named changed in version 2, older .npmbox files won't work with the newer version.)

jeffjasper commented 9 years ago

Thanks for getting back so quickly. I must have still been using an older version of npmbox on my "connected" machine. Also, since my disconnected mac usually requires sudo to perform npm install -g <packageName>, I made sure to unpack the npmbox.npmbox file using sudo. Everything seems to be working now.

desmond-phonegap commented 9 years ago

I have tried all the steps mentioned above but still it does not install. While installing it sends a get request to https://registry.npm.js/npmjs.org/npm.-/npm-2.9.0.taz and some other 4 urls. What could be the reason it does not get from the .npmbox.cache. Thanks in advance

ackerleytng commented 8 years ago

I realised I installed node 0.6.5 instead of node 6.5.

With node 6.5 and npm 3.10.3, I was able to install npmbox with the provided instructions.