I appreciate that everyone cares about the user's installation experience,
but it's also a little nuts that we're 16 message deep into the discussion
of installing a npm module. Like Brian mentioned, this isn't directly a
problem of Apache Cordova.

Let's break it down from a typical user's perspective.

- A typical user will install node.js from the website. Not nvm. Not
building from source.
- On Windows, node.js is installed locally. Globally installing packages is
`npm install -g cordova`
- On OS X, node.js is installed to the system. Globally installing packages
is `sudo npm install -g cordova`
- On Linux, node.js it's managed by the package manager. On Ubuntu,
globally installing packages appears to be `sudo npm install -g cordova`

We can discuss this all day long or we can just break it down by operating
system and leave a note at the bottom suggesting that "sudo" may not be
required for your system.

When it comes to installing Cordova locally (such as Tommy and many
advanced), let's assume that the developers understand npm.

Michael


On Tue, May 13, 2014 at 9:18 AM, Brian LeRoux <b...@brian.io> wrote:

> npm install! you can then call via npm scripts [1]. I have a project going
> right now where I put all the automations in there. clean.
>
> npm run ios === "scripts":{ "ios":"node node_modules/cordova/bin/cordova
> run ios"}
>
>
> On Tue, May 13, 2014 at 5:10 AM, Michal Mocny <mmo...@chromium.org> wrote:
>
> > Tommy, how do you install locally?
> >
> > Specifically, do you install cordova inside a workspace, and if so, how
> do
> > you create that workspace first?
> >
> > -Michal
> >
> >
> > On Mon, May 12, 2014 at 4:47 PM, Tommy Williams <to...@devgeeks.org>
> > wrote:
> >
> > > Just as an aside, I go the other way.. I install Cordova locally. This
> > way
> > > I can have different versions of Cordova for different apps. I just
> use a
> > > build tool (npm run or grunt etc) to call the local cordova .
> > >
> > > Maybe we should revisit the grunt-style split between the global
> > > cordova-cli and a local Cordova that actually does the heavy lifting?
> > > On 13 May 2014 04:49, "Brian LeRoux" <b...@brian.io> wrote:
> > >
> > > > You cannot install a module globally with a default install of Node.
> > This
> > > > isn't really a Cordova issue but one of taste. Some people like to
> > > isolate
> > > > their systems and not install modules globally. Indeed, this is
> > probably
> > > a
> > > > good practice. We could point the way in the docs but we do not want
> to
> > > > change our install instructions to something that will fail by
> default.
> > > >
> > > >
> > > > On Mon, May 12, 2014 at 10:34 AM, Wargo, John <john.wa...@sap.com>
> > > wrote:
> > > >
> > > > > I chatted with Fil about this in the pre-3 days and it was a
> > > requirement
> > > > > at the time. Have things changed to the point where it works
> without
> > > it?
> > > > >  Every time I've tried to do it without sudo on Macintosh it fails.
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Marcel Kinard [mailto:cmarc...@gmail.com]
> > > > > Sent: Friday, May 09, 2014 10:01 AM
> > > > > To: dev@cordova.apache.org
> > > > > Subject: sans sudo on npm install
> > > > >
> > > > > I'm not a Node.js expert, but the Linux person inside me says that
> > > using
> > > > > sudo to install and run things ought to be avoided if possible.
> > > > >
> > > > > Would there be objection if I changed cordova-docs to omit sudo
> from
> > > the
> > > > > npm install commands? And added references to some of these items
> > > below?
> > > > >
> > > > > http://howtonode.org/introduction-to-npm
> > > > >
> > > > >
> > > >
> > >
> >
> http://justjs.com/posts/npm-link-developing-your-own-npm-modules-without-tears
> > > > >
> > > > > https://issues.apache.org/jira/browse/CB-5320
> > > > >
> > > >
> > >
> >
>

Reply via email to