I am trying to create a small app nodejs-based app that runs on a USB drive (that will be inserted in to various Windows OS machines). I have successfully installed nodejs and couchdb on the drive and have tested some basic database scripts. I am now trying to make more advanced scripts and so I have tried to make use of the various modules available for node.
The installation of modules seems to work seamlessly; npm install hasn't failed at all. My problem is, some modules seem to work and others throw an error eg. 'Error: Cannot find module 'express''. So, 'npm' and 'cradle' work but 'coffee-script' and 'express' throw an error despite error free installations. Note that none of the installations is global (-g) because that seems to default to an installation on a hard drive directory. Also, my initial scripts were in a subdirectory of the node directory, whereas the more advanced scripts are not. If the latter makes a difference, why? Do I have to, and is there a way to, make nodejs and its modules 'global' on the USB drive?
> I am trying to create a small app nodejs-based app that runs on a USB > drive (that will be inserted in to various Windows OS machines). I > have successfully installed nodejs and couchdb on the drive and have > tested some basic database scripts. I am now trying to make more > advanced scripts and so I have tried to make use of the various > modules available for node.
> The installation of modules seems to work seamlessly; npm install > hasn't failed at all. My problem is, some modules seem to work and > others throw an error eg. 'Error: Cannot find module 'express''. So, > 'npm' and 'cradle' work but 'coffee-script' and 'express' throw an > error despite error free installations. Note that none of the > installations is global (-g) because that seems to default to an > installation on a hard drive directory. Also, my initial scripts were > in a subdirectory of the node directory, whereas the more advanced > scripts are not. If the latter makes a difference, why? Do I have > to, and is there a way to, make nodejs and its modules 'global' on the > USB drive?
On Saturday, August 25, 2012 12:20:25 AM UTC+10, MikeB_2012 wrote:
> I am trying to create a small app nodejs-based app that runs on a USB > drive (that will be inserted in to various Windows OS machines). I have > successfully installed nodejs and couchdb on the drive and have tested some > basic database scripts. I am now trying to make more advanced scripts and > so I have tried to make use of the various modules available for node.
> The installation of modules seems to work seamlessly; npm install hasn't > failed at all. My problem is, some modules seem to work and others throw > an error eg. 'Error: Cannot find module 'express''. So, 'npm' and 'cradle' > work but 'coffee-script' and 'express' throw an error despite error free > installations. Note that none of the installations is global (-g) because > that seems to default to an installation on a hard drive directory. Also, > my initial scripts were in a subdirectory of the node directory, whereas > the more advanced scripts are not. If the latter makes a difference, why? > Do I have to, and is there a way to, make nodejs and its modules 'global' > on the USB drive?
All you should need to do is run npm ahead of time and then copy the app
including the node_modules folder.
Crate (https://gitcafe.com/hujs/) is a new project that we (Tim Caswell,
Jason Denizac and myself) worked on at hujs (http://hujs.org) which creates
a self-executing node app package.
It's a work in progress, but it sounds like it could be used for your
scenario.
On Wed, Sep 19, 2012 at 7:06 PM, Shizza M <sholto.m...@gmail.com> wrote:
> Mike - is there any doco you can refer me to on how to install nodejs on
> the USB drive?
> On Saturday, August 25, 2012 12:20:25 AM UTC+10, MikeB_2012 wrote:
>> I am trying to create a small app nodejs-based app that runs on a USB
>> drive (that will be inserted in to various Windows OS machines). I have
>> successfully installed nodejs and couchdb on the drive and have tested some
>> basic database scripts. I am now trying to make more advanced scripts and
>> so I have tried to make use of the various modules available for node.
>> The installation of modules seems to work seamlessly; npm install hasn't
>> failed at all. My problem is, some modules seem to work and others throw
>> an error eg. 'Error: Cannot find module 'express''. So, 'npm' and 'cradle'
>> work but 'coffee-script' and 'express' throw an error despite error free
>> installations. Note that none of the installations is global (-g) because
>> that seems to default to an installation on a hard drive directory. Also,
>> my initial scripts were in a subdirectory of the node directory, whereas
>> the more advanced scripts are not. If the latter makes a difference, why?
>> Do I have to, and is there a way to, make nodejs and its modules 'global'
>> on the USB drive?
On Wed, Sep 26, 2012 at 5:43 AM, Glenn Block <glenn.bl...@gmail.com> wrote:
> All you should need to do is run npm ahead of time and then copy the app
> including the node_modules folder.
> Crate (https://gitcafe.com/hujs/) is a new project that we (Tim Caswell,
> Jason Denizac and myself) worked on at hujs (http://hujs.org) which
> creates a self-executing node app package.
> It's a work in progress, but it sounds like it could be used for your
> scenario.
> On Wed, Sep 19, 2012 at 7:06 PM, Shizza M <sholto.m...@gmail.com> wrote:
>> Mike - is there any doco you can refer me to on how to install nodejs on
>> the USB drive?
>> On Saturday, August 25, 2012 12:20:25 AM UTC+10, MikeB_2012 wrote:
>>> I am trying to create a small app nodejs-based app that runs on a USB
>>> drive (that will be inserted in to various Windows OS machines). I have
>>> successfully installed nodejs and couchdb on the drive and have tested some
>>> basic database scripts. I am now trying to make more advanced scripts and
>>> so I have tried to make use of the various modules available for node.
>>> The installation of modules seems to work seamlessly; npm install hasn't
>>> failed at all. My problem is, some modules seem to work and others throw
>>> an error eg. 'Error: Cannot find module 'express''. So, 'npm' and 'cradle'
>>> work but 'coffee-script' and 'express' throw an error despite error free
>>> installations. Note that none of the installations is global (-g) because
>>> that seems to default to an installation on a hard drive directory. Also,
>>> my initial scripts were in a subdirectory of the node directory, whereas
>>> the more advanced scripts are not. If the latter makes a difference, why?
>>> Do I have to, and is there a way to, make nodejs and its modules 'global'
>>> on the USB drive?