ERROR [stage-4 6/6] RUN bin/rails fly:build when 'fly deploy'

Hi all,

I need your wisdom on this one :
I have this error showing up telling me that i have a missing package in my lockfile. I ran ‘yarn install’ as suggested but the same error keep showing up.

#24 9.407 Compiling...
#24 11.39 Compilation failed:
#24 11.39 Internal Error: portfolio@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
#24 11.39     at gQ.getCandidates (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:435:5146)
#24 11.39     at Wf.getCandidates (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:391:1264)
#24 11.39     at /root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:439:7695
#24 11.39     at Rf (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:390:8965)
#24 11.39     at ue (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:439:7675)
#24 11.39 
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -c bin/rails fly:build]: exit code: 1

Funny thing is I didn’t encounter any problem to deploy the previous versions of this app. But today i had to re-install another version of bundler and uninstall gem spring.

Thank you for your insight!

Can you share the lockfille and Dockerfile in here?

DOCKERFILE:

# syntax = docker/dockerfile:experimental
ARG RUBY_VERSION=3.1.2
ARG VARIANT=jemalloc-slim
FROM quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-${VARIANT} as base

ARG NODE_VERSION=16
ARG BUNDLER_VERSION=2.3.16

ARG RAILS_ENV=production
ENV RAILS_ENV=${RAILS_ENV}

ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true

ARG BUNDLE_WITHOUT=development:test
ARG BUNDLE_PATH=vendor/bundle
ENV BUNDLE_PATH ${BUNDLE_PATH}
ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT}

RUN mkdir /app
WORKDIR /app
RUN mkdir -p tmp/pids

SHELL ["/bin/bash", "-c"]

RUN curl https://get.volta.sh | bash

ENV BASH_ENV ~/.bashrc
ENV VOLTA_HOME /root/.volta
ENV PATH $VOLTA_HOME/bin:/usr/local/bin:$PATH

RUN volta install node@${NODE_VERSION} && volta install yarn

FROM base as build_deps

ARG DEV_PACKAGES="git build-essential libpq-dev wget vim curl gzip xz-utils libsqlite3-dev"
ENV DEV_PACKAGES ${DEV_PACKAGES}

RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \
    --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \
    apt-get update -qq && \
    apt-get install --no-install-recommends -y ${DEV_PACKAGES} \
    && rm -rf /var/lib/apt/lists /var/cache/apt/archives

FROM build_deps as gems

RUN gem install -N bundler -v ${BUNDLER_VERSION}

COPY Gemfile* ./
RUN bundle install &&  rm -rf vendor/bundle/ruby/*/cache

FROM build_deps as node_modules

COPY package*json ./
COPY yarn.* ./

RUN if [ -f "yarn.lock" ]; then \
    yarn install; \
    elif [ -f "package-lock.json" ]; then \
    npm install; \
    else \
    mkdir node_modules; \
    fi

FROM base

ARG PROD_PACKAGES="postgresql-client file vim curl gzip libsqlite3-0"
ENV PROD_PACKAGES=${PROD_PACKAGES}

RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt \
    --mount=type=cache,id=prod-apt-lib,sharing=locked,target=/var/lib/apt \
    apt-get update -qq && \
    apt-get install --no-install-recommends -y \
    ${PROD_PACKAGES} \
    && rm -rf /var/lib/apt/lists /var/cache/apt/archives

COPY --from=gems /app /app
COPY --from=node_modules /app/node_modules /app/node_modules

ENV SECRET_KEY_BASE 1

COPY . .

RUN chmod +x /app/bin/* && \
    sed -i 's/ruby.exe/ruby/' /app/bin/* && \
    sed -i '/^#!/aDir.chdir File.expand_path("..", __dir__)' /app/bin/*

RUN bin/rails fly:build

ENV PORT 8080

ARG SERVER_COMMAND="bin/rails fly:server"
ENV SERVER_COMMAND ${SERVER_COMMAND}
CMD ${SERVER_COMMAND}

Gemfile.lock:

GIT
  remote: https://github.com/heartcombo/simple_form.git
  revision: 31fe25504771bd6cd425b585a4e0ed652fba4521
  specs:
    simple_form (5.1.0)
      actionpack (>= 5.2)
      activemodel (>= 5.2)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (7.0.3.1)
      actionpack (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (7.0.3.1)
      actionpack (= 7.0.3.1)
      activejob (= 7.0.3.1)
      activerecord (= 7.0.3.1)
      activestorage (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      mail (>= 2.7.1)
      net-imap
      net-pop
      net-smtp
    actionmailer (7.0.3.1)
      actionpack (= 7.0.3.1)
      actionview (= 7.0.3.1)
      activejob (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      mail (~> 2.5, >= 2.5.4)
      net-imap
      net-pop
      net-smtp
      rails-dom-testing (~> 2.0)
    actionpack (7.0.3.1)
      actionview (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      rack (~> 2.0, >= 2.2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actiontext (7.0.3.1)
      actionpack (= 7.0.3.1)
      activerecord (= 7.0.3.1)
      activestorage (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      globalid (>= 0.6.0)
      nokogiri (>= 1.8.5)
    actionview (7.0.3.1)
      activesupport (= 7.0.3.1)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    activejob (7.0.3.1)
      activesupport (= 7.0.3.1)
      globalid (>= 0.3.6)
    activemodel (7.0.3.1)
      activesupport (= 7.0.3.1)
    activerecord (7.0.3.1)
      activemodel (= 7.0.3.1)
      activesupport (= 7.0.3.1)
    activestorage (7.0.3.1)
      actionpack (= 7.0.3.1)
      activejob (= 7.0.3.1)
      activerecord (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      marcel (~> 1.0)
      mini_mime (>= 1.1.0)
    activesupport (7.0.3.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
    addressable (2.8.1)
      public_suffix (>= 2.0.2, < 6.0)
    autoprefixer-rails (10.4.7.0)
      execjs (~> 2)
    bindex (0.8.1)
    bootsnap (1.13.0)
      msgpack (~> 1.2)
    builder (3.2.4)
    bulma-rails (0.9.3)
      sassc (~> 2.0)
    byebug (11.1.3)
    capybara (3.37.1)
      addressable
      matrix
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (>= 1.5, < 3.0)
      xpath (~> 3.2)
    childprocess (4.1.0)
    concurrent-ruby (1.1.10)
    crass (1.0.6)
    digest (3.1.0)
    erubi (1.11.0)
    execjs (2.8.1)
    ffi (1.15.5)
    font-awesome-sass (6.2.0)
      sassc (~> 2.0)
    globalid (1.0.0)
      activesupport (>= 5.0)
    i18n (1.12.0)
      concurrent-ruby (~> 1.0)
    jbuilder (2.11.5)
      actionview (>= 5.0.0)
      activesupport (>= 5.0.0)
    jquery-rails (4.5.0)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    listen (3.7.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.18.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (1.0.2)
    matrix (0.4.2)
    method_source (1.0.0)
    mini_mime (1.1.2)
    minitest (5.16.3)
    msgpack (1.5.6)
    net-imap (0.2.3)
      digest
      net-protocol
      strscan
    net-pop (0.1.1)
      digest
      net-protocol
      timeout
    net-protocol (0.1.3)
      timeout
    net-smtp (0.3.1)
      digest
      net-protocol
      timeout
    nio4r (2.5.8)
    nokogiri (1.13.8-x86_64-darwin)
      racc (~> 1.4)
    nokogiri (1.13.8-x86_64-linux)
      racc (~> 1.4)
    pg (1.4.3)
    public_suffix (5.0.0)
    puma (5.6.5)
      nio4r (~> 2.0)
    racc (1.6.0)
    rack (2.2.4)
    rack-mini-profiler (2.3.4)
      rack (>= 1.2.0)
    rack-proxy (0.7.2)
      rack
    rack-test (2.0.2)
      rack (>= 1.3)
    rails (7.0.3.1)
      actioncable (= 7.0.3.1)
      actionmailbox (= 7.0.3.1)
      actionmailer (= 7.0.3.1)
      actionpack (= 7.0.3.1)
      actiontext (= 7.0.3.1)
      actionview (= 7.0.3.1)
      activejob (= 7.0.3.1)
      activemodel (= 7.0.3.1)
      activerecord (= 7.0.3.1)
      activestorage (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      bundler (>= 1.15.0)
      railties (= 7.0.3.1)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.4.3)
      loofah (~> 2.3)
    railties (7.0.3.1)
      actionpack (= 7.0.3.1)
      activesupport (= 7.0.3.1)
      method_source
      rake (>= 12.2)
      thor (~> 1.0)
      zeitwerk (~> 2.5)
    rake (13.0.6)
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    regexp_parser (2.5.0)
    rexml (3.2.5)
    rubyzip (2.3.2)
    sass-rails (6.0.0)
      sassc-rails (~> 2.1, >= 2.1.1)
    sassc (2.4.0)
      ffi (~> 1.9)
    sassc-rails (2.1.2)
      railties (>= 4.0.0)
      sassc (>= 2.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    selenium-webdriver (4.4.0)
      childprocess (>= 0.5, < 5.0)
      rexml (~> 3.2, >= 3.2.5)
      rubyzip (>= 1.2.2, < 3.0)
      websocket (~> 1.0)
    semantic_range (3.0.0)
    sprockets (4.1.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.4.2)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
      sprockets (>= 3.0.0)
    stimulus-rails (1.1.0)
      railties (>= 6.0.0)
    strscan (3.0.4)
    thor (1.2.1)
    tilt (2.0.11)
    timeout (0.3.0)
    turbolinks (5.2.1)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (2.0.5)
      concurrent-ruby (~> 1.0)
    web-console (4.2.0)
      actionview (>= 6.0.0)
      activemodel (>= 6.0.0)
      bindex (>= 0.4.0)
      railties (>= 6.0.0)
    webdrivers (5.0.0)
      nokogiri (~> 1.6)
      rubyzip (>= 1.3.0)
      selenium-webdriver (~> 4.0)
    webpacker (5.4.3)
      activesupport (>= 5.2)
      rack-proxy (>= 0.6.1)
      railties (>= 5.2)
      semantic_range (>= 2.3.0)
    websocket (1.2.9)
    websocket-driver (0.7.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    zeitwerk (2.6.0)

PLATFORMS
  x86_64-darwin-19
  x86_64-linux

DEPENDENCIES
  autoprefixer-rails
  bootsnap (>= 1.4.4)
  bulma-rails (~> 0.9.3)
  byebug
  capybara (>= 3.26)
  font-awesome-sass (~> 6.1)
  jbuilder (~> 2.7)
  jquery-rails
  listen (~> 3.3)
  pg (~> 1.1)
  puma (~> 5.0)
  rack-mini-profiler (~> 2.0)
  rails (~> 7.0.0)
  sass-rails (>= 6)
  selenium-webdriver (>= 4.0.0.rc1)
  simple_form!
  sprockets-rails
  stimulus-rails
  turbolinks (~> 5)
  tzinfo-data
  web-console (>= 4.1.0)
  webdrivers
  webpacker (~> 5.0)

RUBY VERSION
   ruby 3.1.2p20

BUNDLED WITH
   2.3.22

There actually are two separate lockfiles involved because your application is using both Ruby and Node.

Ruby uses Gemfile and bundler. And you have a Gemfile.lock.

Node uses npm and yarn. And you have a yarn.lock.

The error you show above is on the node side. It suggests that you need to run yarn install on the fly build machine, but your Dockerfile clearly does that.

One way to force it to rerun is to to delete the yarn.lock file and run yarn install on your development machine. This will produce a new yarn.lock which will cause yarn install to be rerun the next time you deploy.

I have no idea if that will help, but give it a try.

1 Like

I tried as you suggested, a new yarn.lock is generated but i still have the same error on deployment.

On the Dockerfile the bundler version is 2.3.16 and on the Gemfile it is 2.3.22.
Could this lead to any error ?

Changing the bundler version in the Dockerfile to match the Gemfile is a good idea. That being said, doing so won’t fix a missing node module error.

I’m not familiar with yarn workspaces, but reading Workspaces | Yarn, it looks like it is a mechanism by which you can have multiple package.json files in your project. I’m wondering if you have "workspaces" defined in your main package.json?

Indeed, changing the bundler version in the Dockerfile to match the Gemfile didn’t fix it.

It seems I have only one workspace named ‘portfolio’ (the name of my website) which make sense.

{
  "name": "portfolio",
  "private": true,
  "dependencies": {
    "@hotwired/stimulus": "^3.1.0",
    "@hotwired/stimulus-webpack-helpers": "^1.0.1",
    "@popperjs/core": "^2.11.5",
    "@rails/actioncable": "^7.0.3-1",
    "@rails/activestorage": "^7.0.3-1",
    "@rails/ujs": "^7.0.3-1",
    "@rails/webpacker": "5.4.3",
    "turbolinks": "^5.2.0",
    "webpack": "^4.46.0",
    "webpack-cli": "^3.3.12"
  },
  "version": "0.1.0",
  "devDependencies": {
    "webpack-dev-server": "^3"
  }
}

Does yarn global list show anything? I’m wondering if you have something globally installed that is needed by your application.

We also had deploys start failing today. I haven’t had time to debug much yet, but the error looks similar:

 => [base 6/6] RUN volta install node@16 && volta install yarn                        5.0s 
 => [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=  15.9s 
 => CANCELED [stage-4 1/5] RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,  17.6s 
 => [gems 1/3] RUN gem install -N bundler -v 2.3.9                                    0.9s 
 => [node_modules 1/3] COPY package*json ./                                           0.0s 
 => [node_modules 2/3] COPY yarn.* ./                                                 0.0s 
 => CANCELED [node_modules 3/3] RUN if [ -f "yarn.lock" ]; then     yarn install;     1.7s
 => [gems 2/3] COPY Gemfile* ./                                                       0.0s 
 => ERROR [gems 3/3] RUN bundle install &&  rm -rf vendor/bundle/ruby/*/cache         0.7s
------                                                                                     
 > [gems 3/3] RUN bundle install &&  rm -rf vendor/bundle/ruby/*/cache:                    
#16 0.633 Your Ruby version is 2.7.3, but your Gemfile specified 3.1.2                     
------                                                                                     
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -c bundle install &&  rm -rf vendor/bundle/ruby/*/cache]: exit code: 18       

@danielmorrison That looks different to me. See what happens if you change your Dockerfile to specify:

ARG RUBY_VERSION=3.1.2

@rubys yarn global list just shows the version: yarn global v1.22.19
The ruby_version is already set up as 3.1.2 in the Dockerfile and gemfiles.

I still have the same error showing up. When i yarn install i have an odd message:

yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.33s.

If i remove package-lock.json it doesn’t change the error i get at fly:build

While I don’t have as much experience with node as I do with ruby, that message indicates that you have run a mixture of npm install and yarn install commands. Just a guess, but try removing the node_modules directory and run yarn install then fly deploy. If yarn install works on your machine, but if you take those same files and same version of node, etc, I have no idea why yarn install would fail on the build machine, and fail in a way that doesn’t tell you what package can’t be found.

When i try with Heroku, it seem webpack command can’t be found, and deployment fail aswell. When i run yarn install (after removing yarn.lock) rails/webpacker seems to be the problem aswell according to the warnings.

I guess my node version v16.13.1 (or yarn version v1.22.17?) is somehow not compatible with rails/webpacker ?

My guess is that your version of node and yarn are fine, I suspect that your package.json is the problem. From your Gemfile.lock, you are trying to run Rails 7.0.3. I have Rails 7.0.4 installed, and when I generate a new project with webpack the package.json starts out with:

{
  "name": "app",
  "private": "true",
  "dependencies": {
    "@hotwired/stimulus": "^3.1.0",
    "@hotwired/turbo-rails": "^7.2.2",
    "webpack": "^5.74.0",
    "webpack-cli": "^4.10.0"
  },
  "scripts": {
    "build": "webpack --config webpack.config.js"
  }
}

I suspect that you do not want to have rails/ujs, rails/webpacker, and turbolinks, and you do want more recent versions of webpack. And you definitely want to have the build script.

1 Like

Removing rails/webpacker did the trick, (I also removed rails/ujs and turbolinks, replaced with turbo). I am able to deploy again.

In any case, it was very instructive, thank you for your help.

While I was AFK today, my team got this working by making sure we were using yarn 2 locally (since we seemed to be on fly), and then generating a fresh yarn.lock file. :man_shrugging:

I ran into this same issue and it was also due to different versions of yarn. Instead of updating to yarn 2 locally, I modified the Dockerfile to use yarn 1 when deploying to fly.

Right after volta installs node and yarn, I added this command to resolve the issue:

# Use yarn v1
RUN yarn set version classic

This was for a Rails 6.1.4.1 app.

2 Likes

@clouvet That’s helpful!

I’ve made a change so that the next version of flyctl will set the yarn version:

2 Likes

Glad to help out!

@rubys I’m also getting the same error. I’m using rails 7.0.4.

#26 6.507 Compiling...
#26 9.419 Compilation failed:
#26 9.419 Internal Error: @saeloun/miru-web@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
#26 9.419     at gQ.getCandidates (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:435:5146)
#26 9.419     at Wf.getCandidates (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:391:1264)
#26 9.419     at /root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:439:7695
#26 9.419     at Rf (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:390:8965)
#26 9.419     at ue (/root/.volta/tools/image/yarn/3.2.4/bin/yarn.js:439:7675)
#26 9.419
{
  "name": "@saeloun/miru-web",
  "version": "0.6.0",
  "dependencies": {
    "@babel/plugin-proposal-private-methods": "^7.16.5",
    "@babel/preset-react": "^7.16.5",
    "@babel/preset-typescript": "^7.16.5",
    "@fontsource/plus-jakarta-sans": "^4.5.0",
    "@headlessui/react": "^1.4.2",
    "@heroicons/react": "^1.0.5",
    "@rails/actioncable": "^7.0.4",
    "@rails/activestorage": "^7.0.4",
    "@rails/ujs": "^7.0.4",
    "@rails/webpacker": "5.4.0",
    "@types/react": "^17.0.38",
    "@types/react-dom": "^17.0.11",
    "@typescript-eslint/eslint-plugin": "^5.7.0",
    "@typescript-eslint/parser": "^5.7.0",
    "alpine-turbo-drive-adapter": "^2.0.0",
    "alpinejs": "^2.2.5",
    "autoprefixer": "~9",
    "autosize": "^5.0.1",
    "axios": "^0.24.0",
    "babel-plugin-js-logger": "^1.0.17",
    "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
    "classnames": "^2.3.1",
    "currency-symbol-map": "^5.0.1",
    "date-fns": "^2.28.0",
    "dayjs": "^1.11.0",
    "faker": "5.5.3",
    "fork-ts-checker-webpack-plugin": "^6.5.0",
    "formik": "^2.2.9",
    "jquery": "^3.6.0",
    "js-logger": "^1.6.1",
    "phosphor-react": "^1.4.1",
    "postcss": "~7",
    "prop-types": "^15.7.2",
    "puppeteer": "^13.6.0",
    "ramda": "^0.28.0",
    "react": "^17.0.2",
    "react-autocomplete": "^1.8.1",
    "react-datepicker": "^4.7.0",
    "react-dom": "^17.0.2",
    "react-ga4": "^1.4.1",
    "react-infinite-scroll-component": "^6.1.0",
    "react-router-dom": "^6.2.2",
    "react-select": "^5.2.2",
    "react-table": "^7.7.0",
    "react-toastify": "^8.1.0",
    "react-tooltip": "^4.2.21",
    "react-transition-group": "1.x",
    "react_ujs": "^2.6.1",
    "tailwindcss": "npm:@tailwindcss/postcss7-compat",
    "toastr": "^2.1.4",
    "typescript": "^4.5.4",
    "webpack": "^4.46.0",
    "webpack-cli": "^3.3.12",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/eslint-parser": "^7.16.3",
    "@webpack-cli/serve": "^1.6.0",
    "cypress": "^10.3.0",
    "eslint": "^8.4.1",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-cypress": "^2.12.1",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-jam3": "^0.2.3",
    "eslint-plugin-json": "^3.1.0",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-promise": "^5.2.0",
    "eslint-plugin-react": "^7.27.1",
    "eslint-plugin-react-hooks": "^4.3.0",
    "eslint-plugin-unused-imports": "^2.0.0",
    "husky": "^7.0.0",
    "lint-staged": "^12.1.2",
    "webpack-dev-server": "3.11.2"
  },
  "lint-staged": {
    "app/javascript/**/*.{js,json,ts,tsx}": [
      "eslint --fix",
      "git add"
    ],
    "./**/*.rb": [
      "bundle exec rubocop -a"
    ],
    "{Gemfile,Rakefile,config.ru}": [
      "bundle exec rubocop -a"
    ]
  },
  "scripts": {
    "prepare": "husky install",
    "cy:open:dev": "cypress open",
    "cy:run:dev": "cypress run --browser chrome --headless --record --key 78e63e75-c093-4cfa-bc9b-d01afbb2aa49",
    "cy:run:staging": "cypress run --browser chrome --headless --config baseUrl=https://miru-staging.fly.dev/  --record --key 78e63e75-c093-4cfa-bc9b-d01afbb2aa49",
    "cy:open:staging": "cypress open --config baseUrl=https://miru-staging.fly.dev/",
    "lint": "eslint ./cypress",
    "lint:fix": "eslint --fix ./cypress",
    "lint:ui": "eslint ./app/javascript",
    "lint:ui:fix": "eslint --fix ./app/javascript"
  }
}