From owner-freebsd-questions@freebsd.org Fri Oct 16 23:26:26 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67BBEA16FD5 for ; Fri, 16 Oct 2015 23:26:26 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CC4DF8A for ; Fri, 16 Oct 2015 23:26:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-41-64.dynamic.qsc.de [92.195.41.64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 4F1CB27677; Sat, 17 Oct 2015 01:26:17 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t9GNQHoS002074; Sat, 17 Oct 2015 01:26:17 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 17 Oct 2015 01:26:17 +0200 From: Polytropon To: Matthias Apitz Cc: freebsd-questions@freebsd.org Subject: Re: GitBook on FreeBSD? Message-Id: <20151017012617.3bc51864.freebsd@edvax.de> In-Reply-To: <20151016183244.GA21879@c720-r276659> References: <20151016064251.GA1975@c720-r276659> <86mvvjymhd.fsf@WorkBox.Home> <20151016183244.GA21879@c720-r276659> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 23:26:26 -0000 On Fri, 16 Oct 2015 20:32:45 +0200, Matthias Apitz wrote: > El d=EDa Friday, October 16, 2015 a las 08:25:02AM -0500, Brandon J. Wand= ersee escribi=F3: >=20 > > > Is it possible (has someone) to install GitBook locally on FreeBSD, to > > > do the book rendering to HTML locally? I do not see any port for this. > > > > > > Thanks > > > > > > matthias > >=20 > > There's no port for GitBook, but there is one for npm. > >=20 > > https://www.freshports.org/www/npm/ >=20 > Thanks. I have installed www/npm and run: >=20 > $ npm install gitbook-cli -g > npm ERR! FreeBSD 11.0-CURRENT > npm ERR! argv "node" "/usr/local/bin/npm" "install" "gitbook-cli" "-g" > npm ERR! node v0.10.32 > npm ERR! npm v2.0.2 > npm ERR! path /usr/local/lib/node_modules/gitbook-cli > npm ERR! code EACCES > npm ERR! errno 3 >=20 > npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/gitbook-cli' > npm ERR! { [Error: EACCES, mkdir > '/usr/local/lib/node_modules/gitbook-cli'] > npm ERR! errno: 3, > npm ERR! code: 'EACCES', > npm ERR! path: '/usr/local/lib/node_modules/gitbook-cli', > npm ERR! fstream_type: 'Directory', > npm ERR! fstream_path: '/usr/local/lib/node_modules/gitbook-cli', > npm ERR! fstream_class: 'DirWriter', > npm ERR! fstream_stack:=20 > npm ERR! [ > '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:3= 6:23', > npm ERR! > '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53', > npm ERR! 'Object.oncomplete (fs.js:107:15)' ] } > npm ERR!=20 > npm ERR! Please try running this command again as root/Administrator. > ... >=20 > Is it safe to run this as root? Not more or less safe than "curl | sudo bash", I'd say. ;-) On the other hand, couldn't you specify a path local to your user account (e. g., ~/node_modules) for a local installation of the gitbook-cli package? Of course it's a little bit problematic when several package managers (others than the system's pkg) want to write stuff to system-level directories. And npm isn't the only example I could think of... --=20 Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...