Comments (8)
I can confirm that #97 resolves the issue.
I'm in team with @serioushaircut and was seeing the same issue. @gauravtiwari
from webpacker.
Found the very same problem today. That's the way Rails.root.join works with an absolute path in the middle.
irb(main):004:0> Rails.root.join('public', '/lib')
=> #<Pathname:/lib>
So the fallback in case no config available for these paths entails an absolute path '/packs' for digests_path which might break your setup depending on your permissions.
Simple workaround (not fix) is to configure packs_dist_path in your production/staging environment to be 'packs' hence overriding default '/packs'.
The path assembly based on packs_path, digest_path, etc. can be found in at least two places:
lib/tasks/webpacker.rake
lib/webpacker/railtie.rb
from webpacker.
@serioushaircut Hey, yes i tried that but it breaks the asset path because the same packs_dist_path
is used for constructing asset path in the view.
ActionView::Template::Error (The asset "packs/home-react-component-5939abb942a18ece63be.js" is not present in the asset pipeline.):
from webpacker.
@gauravtiwari mmh we could deploy without any errors after setting the relative packs path. I'm gonna check why is that.
from webpacker.
@serioushaircut Yeah, the app deploys fine, but there is a runtime error.
from webpacker.
@gauravtiwari apparently, I did not read your issue carefully. You are right. We get a runtime error on the staging system, which I attributed to another failing part. Still digging what's going on during deployment on heroku.
from webpacker.
@serioushaircut Yeah, right did you take a look at this PR #97 ?
from webpacker.
Cool @widescape 👍 Yeah, not sure if it's the best solution, but it fixes the issue.
from webpacker.
Related Issues (20)
- Webpacker 6 Disable Babel HOT 1
- Webpacker compilation takes more than 1.5 hours HOT 11
- How do I allow a package in node_modules to be processed by babel? HOT 1
- Remove addition of node_modules to Rails.application.config.assets.paths HOT 1
- V6 Status HOT 3
- Raise an error when javascript_pack_tag or stylesheet_pack_tag are called more than once HOT 1
- Regular Expression Denial of Service in postcss HOT 2
- Intermittent Webpacker.dev_server.running? behavior HOT 2
- Host for assets from a webpacker configuration using custom domains not being resolved HOT 2
- Cherry-pick "Nothing to do" logging update onto `5.x` HOT 1
- Rails 6 WebPacker is not calling JQuery inside views HOT 1
- Security Vulnerability in [email protected] HOT 2
- currently no loaders are configured to process this file HOT 1
- Incompatibility with Ruby 3.2.0 HOT 2
- Confusing gem description on RubyGems HOT 1
- Npm package for 5.4.4 was not released HOT 2
- class variable @@local_levels of ActiveSupport::Logger is overtaken by Logger HOT 2
- Trying to deploy but assets assets:precompile fail
- Security Vulnerability for postcss
- Postcss Security Vulnerability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpacker.