Skip to content

sudo yarn global add on Debian (Raspbian) issue #2807

@jugglingcats

Description

@jugglingcats

Do you want to request a feature or report a bug?

Bug. Apologies if this is a duplicate.

What is the current behavior?

$ sudo yarn global add nodemon
yarn global v0.21.3
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "nodemon@1.11.0" with binaries:
      - nodemon
warning No license field
Done in 10.63s.
$ nodemon
-bash: nodemon: command not found

Symbolic link is broken (as seen by non-root user):

$ file /usr/bin/nodemon
/usr/bin/nodemon: broken symbolic link to ../../root/.config/yarn/global/node_modules/nodemon/bin/nodemon.js

Because root folder is not readable by non-root user:

ls -ld /root
drwx------ 13 root root 4096 Feb 28 15:43 /root

What is the expected behavior?

After sudo install the command should be runnable as a normal user. I expect it's very normal on most linux distros for the root user's home directory to be non-readable except by root.

Please mention your node.js, yarn and operating system version.

$ node -v
v7.5.0

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions