Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you need npmbox to unbox a package? #1

Closed
Marcoevich opened this issue Oct 30, 2013 · 8 comments
Closed

Do you need npmbox to unbox a package? #1

Marcoevich opened this issue Oct 30, 2013 · 8 comments

Comments

@Marcoevich
Copy link

Ok, npmbox can be incredibly useful for us to install npm packages on workstations in a intranet only environment, so where the installer is not able to download any dependancies.

Can you just 'npm install package.npmbox -g' ? Or would we have to extract it first? Because in that case I still have to manually install npmbox and all its dependancies on every workstation. That would be very unfortunate..

And from your todo list: I think it's currently not possible to install npmbox packages globally? When do you think such feature would be available? That would be very helpful for us :)

Thx in advance!
Marcoevich

@arei
Copy link
Owner

arei commented Oct 30, 2013

1). You cannot just npm install package.npmbox as npm does not know what an npmbox file is. I am trying to get something similar to npmbox built into npm, but it has little to no traction at this point in time. (See https://github.com/isaacs/npm/issues/3429#issuecomment-27044292).

That said, you can simply npmunbox pacakage and it does the extraction and the install for you. This does require the npmbox itself first be installed. A work around for this requirement would be to have an installed version of npmbox on the media you are transferring the .npmbox files on, and run it from there. This is what I do in our environment.

2). Adding the --global switch pass through is in the list of things to do, but I am not putting much resources into it at this point in time, largely because I do not specifically need it. I do welcome pull requests though!

3). Super excited someone else is using npmbox. Thanks and good luck!

@Marcoevich
Copy link
Author

Hi m8. I didn't realize it was possible to install nodejs/npm on portable media. That's a good advice ;)

  1. There are some npm packages that require to be on your system variables path. They will be a pain to use without that, so therefore it would be helpful to have a -global switch. Once you need it yourself, you will be happy that you've done it ;)

  2. I've been looking for a tool like this for a long time now. I know there once was a tool called npmzip (http://registry.npmjs.org/npmzip/-/npmzip-0.1.3.tgz) that did the trick, but unfortunately that was deleted. Are you perhaps also the author of npmzip?

Don't know if it's possible, but since npmzip no longer exists you should try to rename your project to npmzip, as it will be easier to find for people :)

I do welcome your efforts to implement this in the basic npm repo. I will remind them that many corporate environments run on local intranet networks. Installing packages with npm install is pretty difficult on those systems :)

@Marcoevich
Copy link
Author

Forgive me, I see now that you renamed your project to npmbox :)

May I ask why you renamed it? If i'm looking for a zip tool for the node package manager then a name like npmzip would come to mind sooner than npmbox :)

@arei
Copy link
Owner

arei commented Oct 30, 2013

Yes, I renamed it from npmzip. I thought npmbox better described what the process was over npmzip but your point is taken. At the time I was pushing the commands box/unbox be added for npm to describe this functionality, and I really just built npmbox as an example of how it might be done.

@mdvanes
Copy link

mdvanes commented Dec 17, 2013

Hi, I tried npmbox for installing on an offline system, but I was deterred by having to install npm on a removable medium. This would not work for me, because I can't access removable media from the VM I'm trying to install jshint on (with npmbox). I found that it's possible to install offline packages in npm with npm install foo.tar.gz, but unfortunately you haven't packaged it (yet?). This would for sure make it much easier to install on an offline system (provided you have no dependencies yourself).

@arei
Copy link
Owner

arei commented Dec 17, 2013

@mdvanes I have added documentation to the readme with instructions on Installing npmbox from an npmbox file. This should help with your problem. Thus you can move both npmbox.npmbox and jshint.npmbox over to your closed system, install npmbox as described in the readme, and then use npmbox on jshint.

Please note, however, that if you do not have a means to transfer file to your closed system such as you might do with removable media, nothing I can do will let npmbox work for you.

Also, the method of installing an npm package from a .tar.gz installs only that package and does not install that packages dependencies. Thus in order to use that approach you would first need to identify and install each of the dependencies of the package you want to install and then install the package. More details can be found in the related npm feature request: [Feature] Bundle/Include Dependencies

@arei
Copy link
Owner

arei commented Dec 17, 2013

I am closing this ticket as I have created additional documentation answering this issue in the read me, and created another ticket for the --global issue.

@arei arei closed this as completed Dec 17, 2013
@arei
Copy link
Owner

arei commented Jan 17, 2014

@Marcoevich Issues #3 (global install switch) has been implemented for version 0.2.0 which is now available. Let me know if you have any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants