rubyonjets/jets

jets deploy not working

Closed this issue · 2 comments

on jets version: 3.0.2.,

execute command on Docker,

AWS_REGION=ap-northeast-1 JETS_AGREE=yes JETS_ENV=production jets deploy

then get error below.
Please help me.

Updated ~/.jets/config.yml
Deploying to Lambda monmon-prod environment...
The jets version has changed enough since the last build to merit refreshing the build cache.
Current jets version: 3.0.2 Last built jets version: unknown
Removing /tmp/jets/monmon to start fresh.
=> Compling assets in current project directory
=> yarn install
yarn install v1.22.5
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.74s.
=> JETS_ENV=production bin/webpack
warning package.json: No license field
Hash: 8c1bf6e0c909a90b446f
Version: webpack 4.44.2
Time: 7504ms
Built at: 01/29/2021 2:54:51 AM
                                     Asset       Size       Chunks                         Chunk Names
                    css/theme-058f616b.css  252 bytes        theme  [emitted] [immutable]  theme
                css/theme-058f616b.css.map  564 bytes        theme  [emitted] [dev]        theme
    js/application-e1f775d69c4918a86720.js    318 KiB  application  [emitted] [immutable]  application
js/application-e1f775d69c4918a86720.js.map    375 KiB  application  [emitted] [dev]        application
          js/theme-8d93dc0cc7011472ae21.js   3.93 KiB        theme  [emitted] [immutable]  theme
      js/theme-8d93dc0cc7011472ae21.js.map   3.61 KiB        theme  [emitted] [dev]        theme
                             manifest.json  901 bytes               [emitted]
Entrypoint application = js/application-e1f775d69c4918a86720.js js/application-e1f775d69c4918a86720.js.map
Entrypoint theme = css/theme-058f616b.css js/theme-8d93dc0cc7011472ae21.js css/theme-058f616b.css.map js/theme-8d93dc0cc7011472ae21.js.map
[./app/javascript/packs/application.js] 872 bytes {application} [built]
[./app/javascript/packs/theme.scss] 39 bytes {theme} [built]
[./app/javascript/src/jets/crud.js] 2.24 KiB {application} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 552 bytes {application} [built]
    + 2 hidden modules
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--7-1!node_modules/postcss-loader/src/index.js??ref--7-2!node_modules/sass-loader/dist/cjs.js??ref--7-3!app/javascript/packs/theme.scss:
    Entrypoint mini-css-extract-plugin = *
    [./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./app/javascript/packs/theme.scss] ./node_modules/css-loader/dist/cjs.js??ref--7-1!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./app/javascript/packs/theme.scss 1.04 KiB {mini-css-extract-plugin} [built]
        + 1 hidden module
=> Copying current project directory to temporary build area: /tmp/jets/monmon/stage/code
Traceback (most recent call last):
	22: from /usr/local/bundle/bin/jets:23:in `<main>'
	21: from /usr/local/bundle/bin/jets:23:in `load'
	20: from /usr/local/bundle/gems/jets-3.0.2/exe/jets:14:in `<top (required)>'
	19: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/cli.rb:5:in `start'
	18: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/cli.rb:28:in `start'
	17: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/base.rb:27:in `perform'
	16: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/base.rb:38:in `dispatch'
	15: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	14: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	13: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	12: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/main.rb:27:in `deploy'
	11: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/deploy.rb:33:in `run'
	10: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/deploy.rb:85:in `build_code'
	 9: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/build.rb:27:in `build_code'
	 8: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:36:in `build'
	 7: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:294:in `copy_project'
	 6: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:312:in `move_node_modules'
	 5: from /usr/local/lib/ruby/2.7.0/fileutils.rb:539:in `mv'
	 4: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1587:in `fu_each_src_dest'
	 3: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1605:in `fu_each_src_dest0'
	 2: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1589:in `block in fu_each_src_dest'
	 1: from /usr/local/lib/ruby/2.7.0/fileutils.rb:548:in `block in mv'
/usr/local/lib/ruby/2.7.0/fileutils.rb:548:in `rename': Invalid cross-device link @ rb_file_s_rename - (/sample_jets_app/node_modules, /tmp/jets/monmon/node_modules) (Errno::EXDEV)
	34: from /usr/local/bundle/bin/jets:23:in `<main>'
	33: from /usr/local/bundle/bin/jets:23:in `load'
	32: from /usr/local/bundle/gems/jets-3.0.2/exe/jets:14:in `<top (required)>'
	31: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/cli.rb:5:in `start'
	30: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/cli.rb:28:in `start'
	29: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/base.rb:27:in `perform'
	28: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/base.rb:38:in `dispatch'
	27: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	26: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	25: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	24: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/main.rb:27:in `deploy'
	23: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/deploy.rb:33:in `run'
	22: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/deploy.rb:85:in `build_code'
	21: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/build.rb:27:in `build_code'
	20: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:36:in `build'
	19: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:294:in `copy_project'
	18: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:312:in `move_node_modules'
	17: from /usr/local/lib/ruby/2.7.0/fileutils.rb:539:in `mv'
	16: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1587:in `fu_each_src_dest'
	15: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1605:in `fu_each_src_dest0'
	14: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1589:in `block in fu_each_src_dest'
	13: from /usr/local/lib/ruby/2.7.0/fileutils.rb:547:in `block in mv'
	12: from /usr/local/lib/ruby/2.7.0/fileutils.rb:555:in `rescue in block in mv'
	11: from /usr/local/lib/ruby/2.7.0/fileutils.rb:778:in `remove_entry'
	10: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1502:in `postorder_traverse'
	 9: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1502:in `each'
	 8: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1503:in `block in postorder_traverse'
	 7: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1509:in `postorder_traverse'
	 6: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1504:in `block (2 levels) in postorder_traverse'
	 5: from /usr/local/lib/ruby/2.7.0/fileutils.rb:780:in `block in remove_entry'
	 4: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1452:in `remove'
	 3: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1459:in `remove_dir1'
	 2: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1471:in `platform_support'
	 1: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1460:in `block in remove_dir1'
/usr/local/lib/ruby/2.7.0/fileutils.rb:1460:in `rmdir': Directory not empty @ dir_s_rmdir - /sample_jets_app/node_modules/object.getownpropertydescriptors (Errno::ENOTEMPTY)
	31: from /usr/local/bundle/bin/jets:23:in `<main>'
	30: from /usr/local/bundle/bin/jets:23:in `load'
	29: from /usr/local/bundle/gems/jets-3.0.2/exe/jets:14:in `<top (required)>'
	28: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/cli.rb:5:in `start'
	27: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/cli.rb:28:in `start'
	26: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/base.rb:27:in `perform'
	25: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/base.rb:38:in `dispatch'
	24: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
	23: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
	22: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
	21: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/main.rb:27:in `deploy'
	20: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/deploy.rb:33:in `run'
	19: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/deploy.rb:85:in `build_code'
	18: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/commands/build.rb:27:in `build_code'
	17: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:36:in `build'
	16: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:294:in `copy_project'
	15: from /usr/local/bundle/gems/jets-3.0.2/lib/jets/builders/code_builder.rb:312:in `move_node_modules'
	14: from /usr/local/lib/ruby/2.7.0/fileutils.rb:539:in `mv'
	13: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1587:in `fu_each_src_dest'
	12: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1605:in `fu_each_src_dest0'
	11: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1589:in `block in fu_each_src_dest'
	10: from /usr/local/lib/ruby/2.7.0/fileutils.rb:547:in `block in mv'
	 9: from /usr/local/lib/ruby/2.7.0/fileutils.rb:555:in `rescue in block in mv'
	 8: from /usr/local/lib/ruby/2.7.0/fileutils.rb:778:in `remove_entry'
	 7: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1509:in `postorder_traverse'
	 6: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1509:in `ensure in postorder_traverse'
	 5: from /usr/local/lib/ruby/2.7.0/fileutils.rb:780:in `block in remove_entry'
	 4: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1452:in `remove'
	 3: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1459:in `remove_dir1'
	 2: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1471:in `platform_support'
	 1: from /usr/local/lib/ruby/2.7.0/fileutils.rb:1460:in `block in remove_dir1'
/usr/local/lib/ruby/2.7.0/fileutils.rb:1460:in `rmdir': Directory not empty @ dir_s_rmdir - /sample_jets_app/node_modules (Errno::ENOTEMPTY)

this is /usr/local/lib/ruby/2.7.0/fileutils.rb
fileutils.rb.zip

Dockerfile

FROM ruby:2.7.2

# For Node.js
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -

RUN apt-get update -qq && apt-get install -y nodejs yarnpkg mariadb-client rsync zip unzip build-essential vim

#RUN yarn install --check-files
# Install yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
ENV PATH="/root/.yarn/bin:$PATH"

RUN mkdir /sample_jets_app
WORKDIR /sample_jets_app
COPY Gemfile /sample_jets_app/Gemfile
COPY Gemfile.lock /sample_jets_app/Gemfile.lock
RUN bundle install
COPY . /sample_jets_app

CMD ["jets", "server", "--port", "3000", "--host", "0.0.0.0"]

docker-compose.yml

version: '3'
services:
  web:
    build: .
    command: bash -c "bundle exec jets server --port 3000 --host 0.0.0.0"
    volumes:
      - .:/sample_jets_app
      - bundle_vol:/usr/local/bundle
    ports:
      - "3000:3000"
    depends_on:
      - db
  db:
    image: mysql:5.7
    volumes:
      - mysql_vol:/var/lib/mysql
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=1
volumes:
  bundle_vol:
    driver: local
  mysql_vol:
    driver: local