Open Jehops opened 7 years ago
The error message explains what's wrong:
Failed to auto-install node-gyp. Please run "yarn global add node-gyp" manually. Error: "We don't have permissions to touch the file \"/usr/local/bin/mkdirp\"."
Some packages are missing a dependency on node-gyp
even though they require it. They implicitly rely on npm installing it globally for you. When you try to install one of these packages with Yarn, it first tries to use npm's version of node-gyp
. If that fails, Yarn tries to install node-gyp
itself. However, this is failing because it's trying to install into /usr/local
for some reason.
There's two potential fixes here:
yarn global add node-gyp
yourselfuws
) to include node-gyp
in its dependenciesThanks for your quick response.
Fix 1. is a problem for those who don't have root access on the system. It looks like fix 2. is not going to happen.
Fix 1. is a problem for those who don't have root access on the system.
Hmm, Yarn shouldn't be trying to use /usr/local
if you don't have root access. We haven't done any testing on FreeBSD though, so maybe there's some platform-specific issues here.
Maybe it could also have something to do with the FreeBSD yarn package, which, by default, gets installed under /usr/local
. The package is quite small, containing these files and the only local patch is to set installationMethod
to pkg
in package.json
.
I am willing to test anything that you think would be helpful for getting this working. Just let me know.
This is a bug report for an issue installing node modules for Mastodon on FreeBSD 11.1 with node 6.11.1 and yarn 0.27.5 installed. Here are the package.json (small patch relative to upstream) and yarn.lock files. Doing
yarn install
is successful if npm is installed, but if npm is not installed, this error occurs.yarn install
does not install anything outside of the Mastodon project directory when npm is installed.