[Buildroot] [Bug 9531] NPM fails to build embedded modules
bugzilla at busybox.net
bugzilla at busybox.net
Sun Mar 5 15:34:52 UTC 2017
https://bugs.busybox.net/show_bug.cgi?id=9531
--- Comment #13 from Martin <martin at barkynet.com> ---
I tested this and setting BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL="ghost at 0.11.3"
builds fine when building as a non-root user.
What is happening here is npm is dropping it's root privileges before running
node-pre-gyp which is why you see "node-pre-gyp: Permission denied" because it
can't access the files under /root. --unsafe-perm stops this behaviour which
is why it then works.
I agree with Peter, building as root should be avoided. I would recommend you
modify your Dockerfile to build as a non-root user.
The one change which might be worth making is a recommendation against building
as root in the manual and/or the Makefile.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the buildroot
mailing list