Skip to content

Webpacker not generating files #1596

@diegomichel

Description

@diegomichel

When deploying my application to staging Webpacker shows that it compiles the files to certain folder but there are not folder or files.

npm list|grep webpacker
├─┬ @rails/webpacker@3.5.3
deploy@ubuntu-xenial:~/webapps/app/current$ bundle exec gem list webpacker

*** LOCAL GEMS ***

webpacker (3.5.3)
deploy@ubuntu-xenial:~/webapps/app/current$ RAILS_ENV=staging bundle exec rails webpacker:compile
Webpacker is installed 🎉 🍰
Using /home/deploy/webapps/app/releases/20180702085943/config/webpacker.yml file for setting up webpack paths
-- execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
   -> 0.0911s
Compiling…
Compiled all packs in /home/deploy/webapps/app/releases/20180702085943/public/packs-staging
deploy@ubuntu-xenial:~/webapps/app/current$ ls /home/deploy/webapps/app/releases/20180702085943/public/packs-staging
ls: cannot access '/home/deploy/webapps/app/releases/20180702085943/public/packs-staging': No such file or directory
deploy@ubuntu-xenial:~/webapps/app/current$ 

Config file

deploy@ubuntu-xenial:~/webapps/app/current$ cat config/webpacker.yml 
# Note: You must restart bin/webpack-dev-server for changes to take effect

default: &default
  source_path: app/javascript
  source_entry_path: packs
  public_output_path: packs
  cache_path: tmp/cache/webpacker

  # Additional paths webpack should lookup modules
  # ['app/assets', 'engine/foo/app/assets']
  resolved_paths: []

  # Reload manifest.json on all requests so we reload latest compiled packs
  cache_manifest: false

  extensions:
    - .vue
    - .js
    - .sass
    - .scss
    - .css
    - .module.sass
    - .module.scss
    - .module.css
    - .png
    - .svg
    - .gif
    - .jpeg
    - .jpg

development:
  <<: *default
  compile: true

  # Reference: https://webpack.js.org/configuration/dev-server/
  dev_server:
    https: false
    host: localhost
    port: 3035
    public: localhost:3035
    hmr: false
    # Inline should be set to true if using HMR
    inline: true
    overlay: true
    compress: true
    disable_host_check: true
    use_local_ip: false
    quiet: false
    headers:
      'Access-Control-Allow-Origin': '*'
    watch_options:
      ignored: /node_modules/

staging:
  <<: *default

  # Staging depends on compilation of packs at runtime for development.
  compile: true

  # Cache manifest.json for performance
  cache_manifest: true

  # Compile staging packs to a separate directory
  public_output_path: packs-staging

test:
  <<: *default

  # Test depends on compilation of packs prior at runtime for development.
  compile: true

  # Compile test packs to a separate directory
  public_output_path: packs-test

production:
  <<: *default

  # Production depends on precompilation of packs prior to booting for performance.
  compile: false

  # Cache manifest.json for performance
  cache_manifest: true

Everything works fine in development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions