* Guix and Cordova
@ 2015-03-24 11:40 Daniel Pimentel
2015-03-24 15:57 ` Thompson, David
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Pimentel @ 2015-03-24 11:40 UTC (permalink / raw)
To: guix-devel
Hi Guix, I installed NodeJs (node-0.12.0) that contain NPM (npm-2.5.1),
so I tried install cordova in local profile (npm install cordova), but
there's error when try execute cordova local binary
(node_modules/.bin/cordova):
bash: ./cordova: /usr/bin/env: bad interpreter: No such file or
directory
I tried global install (npm install -g cordova), but there're errors
too:
62 error fstream_path:
'/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/cordova',
62 error fstream_class: 'DirWriter',
62 error fstream_stack:
62 error [
'/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
62 error
'/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
62 error 'FSReqWrap.oncomplete (fs.js:99:15)' ] }
63 error Please try running this command again as root/Administrator.
64 verbose exit [ -13, true ]
65 verbose unbuild lib/node_modules/cordova
66 verbose gentlyRm vacuuming
/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/cordova
And as root with sudo (sudo npm install -g cordova):
4 verbose stack at Pipe.close (net.js:476:12)
5 verbose cwd /home/dani/Desktop/development/node
6 error Linux 3.18.9-gnu
7 error argv
"/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/bin/node"
"/home/dani/.guix-profile/bin/npm" "install" "-g" "cordova"
8 error node v0.12.0
9 error npm v2.5.1
10 error setuid user id does not exist
11 error If you need help, you may report this error at:
11 error <http://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]
I need cordova for research in my master's degree.
Thanks,
--
Daniel Pimentel (d4n1)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guix and Cordova
2015-03-24 11:40 Guix and Cordova Daniel Pimentel
@ 2015-03-24 15:57 ` Thompson, David
2015-03-25 0:43 ` Daniel Pimentel
0 siblings, 1 reply; 3+ messages in thread
From: Thompson, David @ 2015-03-24 15:57 UTC (permalink / raw)
To: Daniel Pimentel; +Cc: guix-devel
On Tue, Mar 24, 2015 at 7:40 AM, Daniel Pimentel <d4n1@openmailbox.org> wrote:
> Hi Guix, I installed NodeJs (node-0.12.0) that contain NPM (npm-2.5.1), so I
> tried install cordova in local profile (npm install cordova), but there's
> error when try execute cordova local binary (node_modules/.bin/cordova):
> bash: ./cordova: /usr/bin/env: bad interpreter: No such file or directory
GuixSD doesn't have a /usr/bin/env script, nor a /usr/bin directory.
Cordova shouldn't make this assumption. If Cordova was built using
Guix, we could easily patch this shebang to refer to the version of
node that it was built with. In the short-term, you should just patch
the script yourself and move on. In the long term, the correct
solution is to package all of the nodejs libraries that Cordova needs
and make it a first-class Guix package. Adding a nodejs build system
is the first step, and adding npm support to 'guix import' will
greatly simplify the task of writing node packages. Are you
interested in helping out with this?
> I tried global install (npm install -g cordova), but there're errors too:
>
> 62 error fstream_path:
> '/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/cordova',
> 62 error fstream_class: 'DirWriter',
> 62 error fstream_stack:
> 62 error [
> '/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
> 62 error
> '/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
> 62 error 'FSReqWrap.oncomplete (fs.js:99:15)' ] }
> 63 error Please try running this command again as root/Administrator.
> 64 verbose exit [ -13, true ]
> 65 verbose unbuild lib/node_modules/cordova
> 66 verbose gentlyRm vacuuming
> /gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/cordova
A global install doesn't work because it's trying to write files into
the store like...
/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js
...which is owned by root, so an unprivileged user cannot touch it.
> And as root with sudo (sudo npm install -g cordova):
> 4 verbose stack at Pipe.close (net.js:476:12)
> 5 verbose cwd /home/dani/Desktop/development/node
> 6 error Linux 3.18.9-gnu
> 7 error argv
> "/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/bin/node"
> "/home/dani/.guix-profile/bin/npm" "install" "-g" "cordova"
> 8 error node v0.12.0
> 9 error npm v2.5.1
> 10 error setuid user id does not exist
> 11 error If you need help, you may report this error at:
> 11 error <http://github.com/npm/npm/issues>
> 12 verbose exit [ 1, true ]
I'm not sure what's going on here, but the result, had this worked,
would have been very bad. You would corrupt your store entry for node
with node module files. Not good.
I can't emphasize this point enough: GuixSD does not use the FHS[0],
so you are bound to run into assumptions made by upstream software
developers that are problematic on GuixSD.
Hope this helps!
[0] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
- Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guix and Cordova
2015-03-24 15:57 ` Thompson, David
@ 2015-03-25 0:43 ` Daniel Pimentel
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Pimentel @ 2015-03-25 0:43 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel, guix-devel-bounces+d4n1=opmbx.org
On 2015-03-24 12:57, Thompson, David wrote:
> On Tue, Mar 24, 2015 at 7:40 AM, Daniel Pimentel <d4n1@openmailbox.org>
> wrote:
>> Hi Guix, I installed NodeJs (node-0.12.0) that contain NPM
>> (npm-2.5.1), so I
>> tried install cordova in local profile (npm install cordova), but
>> there's
>> error when try execute cordova local binary
>> (node_modules/.bin/cordova):
>> bash: ./cordova: /usr/bin/env: bad interpreter: No such file or
>> directory
>
> GuixSD doesn't have a /usr/bin/env script, nor a /usr/bin directory.
> Cordova shouldn't make this assumption. If Cordova was built using
> Guix, we could easily patch this shebang to refer to the version of
> node that it was built with. In the short-term, you should just patch
> the script yourself and move on. In the long term, the correct
> solution is to package all of the nodejs libraries that Cordova needs
> and make it a first-class Guix package. Adding a nodejs build system
> is the first step, and adding npm support to 'guix import' will
> greatly simplify the task of writing node packages. Are you
> interested in helping out with this?
>
>> I tried global install (npm install -g cordova), but there're errors
>> too:
>>
>> 62 error fstream_path:
>> '/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/cordova',
>> 62 error fstream_class: 'DirWriter',
>> 62 error fstream_stack:
>> 62 error [
>> '/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
>> 62 error
>> '/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
>> 62 error 'FSReqWrap.oncomplete (fs.js:99:15)' ] }
>> 63 error Please try running this command again as root/Administrator.
>> 64 verbose exit [ -13, true ]
>> 65 verbose unbuild lib/node_modules/cordova
>> 66 verbose gentlyRm vacuuming
>> /gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/cordova
>
> A global install doesn't work because it's trying to write files into
> the store like...
>
>
> /gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js
>
> ...which is owned by root, so an unprivileged user cannot touch it.
>
>> And as root with sudo (sudo npm install -g cordova):
>> 4 verbose stack at Pipe.close (net.js:476:12)
>> 5 verbose cwd /home/dani/Desktop/development/node
>> 6 error Linux 3.18.9-gnu
>> 7 error argv
>> "/gnu/store/drs76938m19bdi98zjmpvw7i2fxv6gyr-node-0.12.0/bin/node"
>> "/home/dani/.guix-profile/bin/npm" "install" "-g" "cordova"
>> 8 error node v0.12.0
>> 9 error npm v2.5.1
>> 10 error setuid user id does not exist
>> 11 error If you need help, you may report this error at:
>> 11 error <http://github.com/npm/npm/issues>
>> 12 verbose exit [ 1, true ]
>
> I'm not sure what's going on here, but the result, had this worked,
> would have been very bad. You would corrupt your store entry for node
> with node module files. Not good.
>
> I can't emphasize this point enough: GuixSD does not use the FHS[0],
> so you are bound to run into assumptions made by upstream software
> developers that are problematic on GuixSD.
>
> Hope this helps!
>
> [0] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
>
> - Dave
Thanks Dave, I would like help it.
--
Daniel Pimentel (d4n1)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-25 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24 11:40 Guix and Cordova Daniel Pimentel
2015-03-24 15:57 ` Thompson, David
2015-03-25 0:43 ` Daniel Pimentel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.