Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
NPM: How to install packages without compiling them
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mariusz Nowak  
View profile  
 More options Oct 11 2012, 6:06 am
From: Mariusz Nowak <mari...@medikoo.com>
Date: Thu, 11 Oct 2012 03:06:45 -0700 (PDT)
Local: Thurs, Oct 11 2012 6:06 am
Subject: NPM: How to install packages without compiling them

I'd like to create application bundle with all it's dependencies, so it can
be installed on any platform without need of internet connection (other
case is that it shouldn't be dependent on npm repository state - let's say
I want to be sure I can install it without issues in 5 years time).

So technically all packages with it's dependencies need to be downloaded as
usually `npm install` does, but compile step shouldn't proceed.
Afterwards when I load such bundle on any platform, `npm install` should
(without need of downloading anything) just compile already present
packages for given platform,

What would be the easiest way to achieve that?

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Rinehart  
View profile  
 More options Oct 11 2012, 9:30 am
From: Daniel Rinehart <dani...@neophi.com>
Date: Thu, 11 Oct 2012 09:30:24 -0400
Local: Thurs, Oct 11 2012 9:30 am
Subject: Re: [nodejs] NPM: How to install packages without compiling them
I believe the easiest way to achieve what you want to do is by using
the "npm rebuild" command.

-- Daniel R. <dani...@neophi.com> [http://danielr.neophi.com/]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariusz Nowak  
View profile  
 More options Oct 11 2012, 9:49 am
From: Mariusz Nowak <mari...@medikoo.com>
Date: Thu, 11 Oct 2012 06:49:09 -0700 (PDT)
Local: Thurs, Oct 11 2012 9:49 am
Subject: Re: [nodejs] NPM: How to install packages without compiling them

Daniel, I think 'npm rebuild' may work for installation of
already created bundle, but still what's missing is how to download all
dependencies into correct folders without compiling them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bradley Meck  
View profile  
 More options Oct 11 2012, 11:25 am
From: Bradley Meck <bradley.m...@gmail.com>
Date: Thu, 11 Oct 2012 08:25:56 -0700 (PDT)
Local: Thurs, Oct 11 2012 11:25 am
Subject: Re: [nodejs] NPM: How to install packages without compiling them

https://npmjs.org/doc/config.html#rebuild-bundle


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bradley Meck  
View profile  
 More options Oct 11 2012, 11:26 am
From: Bradley Meck <bradley.m...@gmail.com>
Date: Thu, 11 Oct 2012 08:26:24 -0700 (PDT)
Local: Thurs, Oct 11 2012 11:26 am
Subject: Re: [nodejs] NPM: How to install packages without compiling them

Forgot to mention, bundle the dependencies on your build server.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariusz Nowak  
View profile  
 More options Oct 11 2012, 1:19 pm
From: Mariusz Nowak <mari...@medikoo.com>
Date: Thu, 11 Oct 2012 10:19:55 -0700 (PDT)
Local: Thurs, Oct 11 2012 1:19 pm
Subject: Re: [nodejs] NPM: How to install packages without compiling them

Bradley thanks, it's probably best way to install bundle that was already
prepared, but do you know the way how can I create such bundle? This is
what I'm missing (!) :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bradley Meck  
View profile  
 More options Oct 11 2012, 3:30 pm
From: Bradley Meck <bradley.m...@gmail.com>
Date: Thu, 11 Oct 2012 12:30:12 -0700 (PDT)
Local: Thurs, Oct 11 2012 3:30 pm
Subject: Re: [nodejs] NPM: How to install packages without compiling them

you can do something like

```
npm i && cat package.json | json -e "this.bundledDependencies='$(for FILE
in $(ls -A node_modules); do printf "$FILE "; done)'.split(/ /)" >
package.json && npm pack
```

We do something a bit more complex on our build server but this covers most
cases (wont set env variables when spawning npm and such so rebuild-bundled
will have to be set when you `npm i` on any other server if it has install
scripts that need running even if it was bundled).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariusz Nowak  
View profile  
 More options Oct 11 2012, 5:07 pm
From: Mariusz Nowak <mari...@medikoo.com>
Date: Thu, 11 Oct 2012 14:07:23 -0700 (PDT)
Local: Thurs, Oct 11 2012 5:07 pm
Subject: Re: [nodejs] NPM: How to install packages without compiling them

Bradley, thanks. I'll try that. Anyway it looks it needs to be done
programmatically, maybe I'll come up with some neat module that would do
that.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bradley Meck  
View profile  
 More options Oct 14 2012, 9:36 pm
From: Bradley Meck <bradley.m...@gmail.com>
Date: Sun, 14 Oct 2012 18:36:50 -0700 (PDT)
Local: Sun, Oct 14 2012 9:36 pm
Subject: Re: [nodejs] NPM: How to install packages without compiling them

For future
reference: https://groups.google.com/forum/?fromgroups#!topic/nodejs/0iosr9ln2AA


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »