On a development server, for an application barely deployed, rails commands won't execute because of lack of integrity file.
error Couldn't find an integrity file
error Found 1 errors.
========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
Both
yarn install --check-files
yarn install
lead to the same error
compression-webpack-plugin#4.0.1: The engine "node" is incompatible with this module. Expected version ">= 10.13.0". Got "8.17.0"
Found incompatible module
Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The 'visit' prompt is unfortunately of no use, as it does not deal with the node engine.
Being barely deployed, there is no node-modules directory yet, which is expected. However on development machine there is the directory and no issues whatseoever in precompiling assets.
Server context:
node -v
> v8.17.0
How can this situation be unblocked?
you need to update the node to a version higher than the one mentioned >= 10.13.0 then re-install yarn and re-run the check:
if you're on Mac OS:
brew install node#14 && brew link --force node#14
brew install yarn
if you're on Linux:
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
then check if you have a compatible version
node -v
=> v14.2.0
``
if so re-run any of your commands:
```bash
yarn install --check-files
yarn install
Related
When I try to run yarn install --check-files on a rails repo that I cloned I'm getting the following error:
Unknown Syntax Error: Unsupported option name ("--check-files").
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
I've tried updating yarn and node to the latest stable versions
I've tried deleting yarn/node modules and yarn.lock in the local folder and running yarn install again
I've tried yarn upgrade --latest which also brings up a similar error Usage Error: Couldn't find a script named "upgrade".
I'm currently using volta to manage my versions and have not had too much trouble up until now.
I've previously run --check-files on other repos with no problems.
Ok turns out my system was running yarn 3.* globally which was conflicting with my rails version (6.0.5). I had originally installed yarn using brew so I had to uninstall and start again with npm using the following steps:
brew uninstall yarn to remove yarn with brew
npm install -g yarn to install yarn with npm
yarn set version classic to set yarn version to 1.*
yarn -v to make sure I was on version 1.*
When i am creating new rails application i am getting error with webpacker (ArgumentError: Malformed version number string 0.32+git)
I was running into a similar issue running rails 6 on my Docker container. Turns out Rails 6 uses Webpacker, which needs yarn to be installed. Follow steps to install a newer version of Yarn
For Debian make sure these steps are followed
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
and then
sudo apt update && sudo apt install yarn
This gave me yarn --version -> 1.19.1
after which sample rails new blog ran successfully, and added blog/config/webpacker.yml (Related to Vanilla Rails 6.0: "error Command "webpack" not found")
It is strange that the documentation does not mention yarn as a dependency.
I confronted the same issue and resolved by installing yarn using nvm.
npm install -g yarn
After installing and updating yarn to the current version, I have my Webpacker successfully installed.
I installed yarn by running sudo apt-get installed yarn on my POP OS(Ubuntu under the hood), and get the same error as yours.
Then, I have fixed this error by following the steps at yarn official page, https://classic.yarnpkg.com/en/docs/install/#debian-stable
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Then,
sudo apt-get update
Finally,
sudo apt-get install yarn
I should say this error was a step two error, I first had this other highly related problem Vanilla Rails 6.0: "error Command "webpack" not found" and then I was led here.
Here is what I did to solve it. +32 was indeed coming from yarn
$ yarn --version
0.32+git
I tried to find the lucky combination of node/npm/yarn/webpack
but I never won anything at the lottery
so I removed yarn...
open your package.json in your favorite editor
make sure yarn is NOT there
delete yarn, or rename the binary
rails webpacker:install # now happy
rake assets:precompile # also happy
rails s # works fine again, I can use ActionCable finally.
npm ls -g
if no list yarn.
sudo npm install -g yarn --force
then
yarn --version
If you put 0.32+git as version number please try using a numeric version number, eg: 0.32 (drop the +git)
Try to update your Yarn version. Webpacker uses Yarn and it probably won't work with an old version, such as "0.32+git".
When I updated my version, the problem got solved and I could run the rails application.
I am trying to install the capybara-webkit gem on Amazon Linux AMI release 2017.09.
I tried following the install instructions for CentOS (maybe the wrong approach):
sudo yum install -y epel-release
sudo yum install -y qt5-qtwebkit-devel
The first package installed fine, but qt5-qtwebkit-devel gave the following error:
Error: Package: qt5-qtbase-gui-5.6.1-3.el6.x86_64 (epel)
Requires: libgdk-x11-2.0.so.0()(64bit)
Error: Package: qt5-qtbase-gui-5.6.1-3.el6.x86_64 (epel)
Requires: libgdk_pixbuf-2.0.so.0()(64bit)
Error: Package: qt5-qtbase-gui-5.6.1-3.el6.x86_64 (epel)
Requires: libatk-1.0.so.0()(64bit)
Error: Package: qt5-qtbase-gui-5.6.1-3.el6.x86_64 (epel)
Requires: libgtk-x11-2.0.so.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I am unable to resolve the libgdk_pixbuf-2.0.so.0 dependency in Amazon Linux. I tried installing libX11-devel but that did not resolve the issue.
Of course gem install capybara-webkit -v '1.10.1' fails because qt5 is not installed.
I found a blog with instructions for installing capybara with qt-4.8, I would rather use the latest version and would prefer to use a package manager instead of compiling the package manually.
My question is, how can I install capybara-webkit on Amazon Linux AMI using the package managers?
Amazon AMI doesn’t have a yum repo for the libgtk-x11-2.0.so.0. So you need to install other distro packages. In this case, did used CentOS.
$ sudo yum install ftp://ftp.riken.jp/Linux/centos/6/os/x86_64/Packages/hicolor-icon-theme-0.11-1.1.el6.noarch.rpm
$ sudo yum install ftp://ftp.riken.jp/Linux/centos/6/os/x86_64/Packages/atk-1.30.0-1.el6.x86_64.rpm
$ sudo yum install ftp://ftp.riken.jp/Linux/centos/6/os/x86_64/Packages/gdk-pixbuf2-2.24.1-6.el6_7.x86_64.rpm
$ sudo yum install ftp://ftp.riken.jp/Linux/centos/6/os/x86_64/Packages/gtk2-2.24.23-9.el6.x86_64.rpm
Once the packages are install the setup should work for you
PS: Source https://ubunifu.co/python/installing-libgtk-x11-2-0-so-0-in-amazon-linux-ami-2017-03-1
I'm using chef but this is where I got the necessary dependencies.
just add this repo to yum repos, and then do the install
yum_repository 'centos-base' do
url 'http://mirror.centos.org/centos/6/os/x86_64/'
gpgkey 'http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6'
action :add
end
package 'qt5-qtwebkit-devel'
I can't get FlowType to install on Mac OS using brew. I typed:
$> brew update
...
$> brew install flow
Error: You must `brew link objective-caml' before flow can be installed
$> brew link objective-caml
Linking /usr/local/Cellar/objective-caml/4.02.1_2...
Error: Could not symlink share/man/man3/Weak.S.3o
/usr/local/share/man/man3 is not writable.
$>
What's wrong?
Please Try change Permission
sudo chown -R $USER /usr/local/lib
The official installation method for flow is locally per-project using yarn (or npm).
yarn add --dev flow-bin
OR
With npm:
npm install --save-dev flow-bin
See the full instructions at https://flow.org/en/docs/install/
Using Ubuntu debian flavour, have been unsuccessfully trying to install protractor following:
the AngularJS official docs tutorial
by installing nodejs, npm and then downloading protractor from github repo as suggested here.
finally by installing the protractor-rails gem as per this SO.
I can see my nodejs version being: v0.10.25 and npm version being 1.3.10
however when I run either npm install protractor, or npm install -g protractor or follow the steps as per Protractor::Rails
in all cases I get the same error:
Ideas anyone?
Basically, this is a problem of permissions for creating directory.
You should try to set the permission on npm directory in your home dir.
sudo chown -R `whoami` ~/.npm
It is indeed a permissions issue coupled with some linux legacy code.
For those who may run into the same issue, a few steps to follow to sort this out:
the Debian installation has a legacy dir called node, this dir has to be removed and the package nodejs-legacy be installed instead.
Once nodejs-legacy has been installed, you may run the protractor installation (in your project folder) as follows:
sudo npm install -g protractor
once installation is finished check your
protractor --version
you should then get a Version 2.0.0 (as of today in my case)
You should be ready to update your webdriver and fire it up.