运行 安装 Yarn 时出错
Running into errors while installing Yarn
我正在尝试在一台新机器上安装 yarn,在我输入 brew install yarn
后,这是我的命令行输出的内容:
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
apache/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
core/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
dupes/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
php/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
versions/.git/FETCH_HEAD: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock':
Permission denied
error: could not lock config file .git/config: Permission denied
==> Installing dependencies for yarn: icu4c, node
==> Installing yarn dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-
60.1.high_sierra.bottle.t######################################################################## 100.0%
==> Pouring icu4c-60.1.high_sierra.bottle.tar.gz
Error: Permission denied @ unlink_internal - /usr/local/opt/icu4c
提前致谢!
我在按照以下配置安装 webpack 时遇到了以下问题
Ubuntu 14.04
webpacker (3.0.2)
Rails 5.1.4
Ruby 2.3.1p112
我遇到以下错误:
Webpacker requires Node.js >= 6.0.0 and you are using 0.10.25 Please
upgrade Node.js https://nodejs.org/en/download/
我已按照以下步骤解决了我的问题:
在 rails 应用程序中通过 webpack 安装 Vuejs 的步骤
gem Webpacker 解决了很多关于如何将前端集成到 Rails 应用程序的问题
Webpack 先决条件: Ruby 2.2+,Rails 4.2+,Node.js 6.0.0+ 和 Yarn 0.25.2+
(注意:- 以下步骤适用于 ubuntu 14.04 用户)
步骤 1: 安装 Nodejs
- sudo apt-get 更新
- sudo apt-get 安装 nodejs
步骤 2: 安装 Yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key 添加 -
回声 "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get install yarn
第 3 步: 将 webpack gem 添加到您的 rails 应用程序
- gem 'webpacker', '~> 3.0'
然后 捆绑安装,
第 4 步: 在 rails 应用中安装 Vue
- rails webpacker:install:vue
vuejs包安装方式
例如:
npm install vue-strap
现在您在 rails 应用中安装了 vue-strap,
按照步骤
检查您的 rails 应用中是否添加了您的软件包
cd /your_projec_name/node_modules
好像是Homebrew目录里面的权限没有设置正确。
您可以这样做:
sudo chown -R $(whoami) /usr/local
或
使用 npm 安装纱线:
brew uninstall yarn
npm install yarn -g
yarn global upgrade yarn
我正在尝试在一台新机器上安装 yarn,在我输入 brew install yarn
后,这是我的命令行输出的内容:
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
apache/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
core/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
dupes/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
php/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
versions/.git/FETCH_HEAD: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock':
Permission denied
error: could not lock config file .git/config: Permission denied
==> Installing dependencies for yarn: icu4c, node
==> Installing yarn dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-
60.1.high_sierra.bottle.t######################################################################## 100.0%
==> Pouring icu4c-60.1.high_sierra.bottle.tar.gz
Error: Permission denied @ unlink_internal - /usr/local/opt/icu4c
提前致谢!
我在按照以下配置安装 webpack 时遇到了以下问题
Ubuntu 14.04
webpacker (3.0.2)
Rails 5.1.4
Ruby 2.3.1p112
我遇到以下错误:
Webpacker requires Node.js >= 6.0.0 and you are using 0.10.25 Please upgrade Node.js https://nodejs.org/en/download/
我已按照以下步骤解决了我的问题:
在 rails 应用程序中通过 webpack 安装 Vuejs 的步骤
gem Webpacker 解决了很多关于如何将前端集成到 Rails 应用程序的问题
Webpack 先决条件: Ruby 2.2+,Rails 4.2+,Node.js 6.0.0+ 和 Yarn 0.25.2+
(注意:- 以下步骤适用于 ubuntu 14.04 用户)
步骤 1: 安装 Nodejs
- sudo apt-get 更新
- sudo apt-get 安装 nodejs
步骤 2: 安装 Yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key 添加 - 回声 "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get install yarn
第 3 步: 将 webpack gem 添加到您的 rails 应用程序
- gem 'webpacker', '~> 3.0'
然后 捆绑安装,
第 4 步: 在 rails 应用中安装 Vue
- rails webpacker:install:vue
vuejs包安装方式
例如:
npm install vue-strap
现在您在 rails 应用中安装了 vue-strap,
按照步骤
检查您的 rails 应用中是否添加了您的软件包cd /your_projec_name/node_modules
好像是Homebrew目录里面的权限没有设置正确。 您可以这样做:
sudo chown -R $(whoami) /usr/local
或
使用 npm 安装纱线:
brew uninstall yarn
npm install yarn -g
yarn global upgrade yarn