FAQ
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!


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Daniel Rinehart at Oct 11, 2012 at 3:14 pm
    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]

    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mariusz Nowak at Oct 11, 2012 at 1:49 pm
    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

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


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com<javascript:>
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com <javascript:>
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Bradley Meck at Oct 11, 2012 at 4:23 pm
    https://npmjs.org/doc/config.html#rebuild-bundle
    On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote:

    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak <mar...@medikoo.com>
    wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Bradley Meck at Oct 11, 2012 at 7:40 pm
    Forgot to mention, bundle the dependencies on your build server.
    On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote:

    https://npmjs.org/doc/config.html#rebuild-bundle
    On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote:

    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak <mar...@medikoo.com>
    wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mariusz Nowak at Oct 11, 2012 at 6:56 pm
    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 (!) :)
    On Thursday, October 11, 2012 5:26:24 PM UTC+2, Bradley Meck wrote:

    Forgot to mention, bundle the dependencies on your build server.
    On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote:

    https://npmjs.org/doc/config.html#rebuild-bundle
    On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote:

    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak <mar...@medikoo.com>
    wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Bradley Meck at Oct 11, 2012 at 11:28 pm
    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).
    On Thursday, October 11, 2012 12:19:56 PM UTC-5, Mariusz Nowak wrote:

    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 (!) :)
    On Thursday, October 11, 2012 5:26:24 PM UTC+2, Bradley Meck wrote:

    Forgot to mention, bundle the dependencies on your build server.
    On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote:

    https://npmjs.org/doc/config.html#rebuild-bundle
    On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote:

    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak <mar...@medikoo.com>
    wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mariusz Nowak at Oct 11, 2012 at 10:07 pm
    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.

    On Thursday, October 11, 2012 9:30:12 PM UTC+2, Bradley Meck wrote:

    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).
    On Thursday, October 11, 2012 12:19:56 PM UTC-5, Mariusz Nowak wrote:

    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 (!) :)
    On Thursday, October 11, 2012 5:26:24 PM UTC+2, Bradley Meck wrote:

    Forgot to mention, bundle the dependencies on your build server.
    On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote:

    https://npmjs.org/doc/config.html#rebuild-bundle
    On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote:

    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak <mar...@medikoo.com>
    wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Bradley Meck at Oct 15, 2012 at 1:36 am
    For future
    reference: https://groups.google.com/forum/?fromgroups#!topic/nodejs/0iosr9ln2AA
    On Thursday, October 11, 2012 4:07:24 PM UTC-5, Mariusz Nowak wrote:

    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.

    On Thursday, October 11, 2012 9:30:12 PM UTC+2, Bradley Meck wrote:

    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).
    On Thursday, October 11, 2012 12:19:56 PM UTC-5, Mariusz Nowak wrote:

    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 (!) :)
    On Thursday, October 11, 2012 5:26:24 PM UTC+2, Bradley Meck wrote:

    Forgot to mention, bundle the dependencies on your build server.
    On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote:

    https://npmjs.org/doc/config.html#rebuild-bundle
    On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote:

    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.
    On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote:

    I believe the easiest way to achieve what you want to do is by using
    the "npm rebuild" command.

    -- Daniel R. [http://danielr.neophi.com/]


    On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak <mar...@medikoo.com>
    wrote:
    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!


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nod...@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+un...@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedOct 11, '12 at 10:06a
activeOct 15, '12 at 1:36a
posts9
users3
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase