我正在使用基于Ubunt 17.04的Linux 18.
当我运行rails资产时:预编译我得到以下消息在系统中未检测到Yarn可执行文件
当我按照此Post或Webpage中的安装说明进行操作时,我成功安装了Yarn,但是rails一直给我错误
我注意到node.js有适用于Linux Mint的系统软件包,最高版本为17.2,我尝试为Yarn页面执行所有指令并手动安装已安装在我的系统中的node.js.
该消息并不能解释问题.如果我运行纱线 – 帮助它工作,我的纱线 – 转换是0.22
这是我的Linux Mint系统
disTRIB_ID=LinuxMint
disTRIB_RELEASE=18
disTRIB_CODENAME=Sarah
disTRIB_DESCRIPTION="Linux Mint 18 Sarah"
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
cat: /etc/upstream-release: Is a directory
更新
这是我的echo $PATH在终端/opt/yarn-0.22/bin中的输出,但是当我去那条路径时,没有文件夹/opt/yarn-0.22所以我需要了解它的安装位置和配置正确的PATH SETUP
Path Setup
If you chose manual installation, the following steps will add Yarn to path variable and run it from anywhere.
Note: your profile may be in your .profile, .bash_profile, .bashrc, .zshrc, etc.
Add this to your profile: export PATH="$PATH:/opt/yarn-[version]/bin" (the path may vary depending on where you extracted Yarn to)
In the terminal, log in and log out for the changes to take effect
To have access to Yarn’s executables globally, you will need to set up the PATH environment variable in your terminal. To do this, add export PATH="$PATH:`yarn global bin`" to your profile.
非常感谢
最好的祝福
Fabrizio Bertoglio
解决方法:
yarn是节点包管理器yarn
你必须安装它在这里instrauction installation guide
如果你有节点和npm你可以安装它
通过
npm install yarn -g
If you dont have
npm
in your machine go to 07002 and installnode
which will also installnpm
If you want to manage multiple version node like
RVM
then you need to checkout 07003