-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Heroku Precompiling assets failed #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@paulreeve You got |
Oh that shouldn't be related since you are on Rails 5.0 |
It's hard to know if it is a ts, webpack, react or rails issue. As there is not output from the fail. Tricky. |
@paulreeve Could you try this please - in |
Thanks, I will try that now |
I mean inside uglify plugin setting - set |
ok, seems a little more chatty now 🗣 So I now get:
Then my React components build
...etc Then a waterfall of info. THEN at the end
A whole bunch of Angular fun... |
is it because of missing escaping ? 5481c66 this looks weird:
Should it be just like this?
|
hmm sadly not @ytbryan. It could be that though. I may try and mess with it to see if I can get it to work. Any idea what the Angular references are all about? |
I had So I just changed to
Works locally. I still get the same issue. Maybe it is because the Angular examples are expecting it to contain So I changed to
and I still get the complaining about the Angular examples. Is there an assumption that if I'm using TS then I'm also using Angular perhaps? |
@paulreeve Is yarn install being run on heroku? |
Could you paste full heroku logs please? |
soooooo....... I added My full tsconfig.json now looks like this: {
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"module": "es6",
"moduleResolution": "node",
"sourceMap": true,
"jsx": "react",
"target": "es5"
},
"exclude": [
"node_modules",
"public",
"vendor/bundle"
],
"compileOnSave": false
} Worth adding to the README or something? Thanks for your help though @gauravtiwari @ytbryan - you helped me flush that one out. |
Ahh right on, the logs explains it 👍 We should add it it to tsconfig.json |
I was having the same issue. Everything worked locally but when I ran:
The only error I got was error Command failed with exit code 2. To fix the problem I forked webpacker and added $stdout.puts in install.rake. That got to see that in my case we had a file import referenced in application.js as index and it was actually named Index. Which I guess makes sense somehow that it never got referenced locally but it did in production mode. Feel free to use it for debugging: https://github.com/roger-link/webpacker |
Could you please try latest master now? |
There are few points that I found the hard way which you should consider. Always use "include": [
"./app/javascript/"
] The webpack may crash too if you don't do this. |
This is fixed on master 👍 |
Deploying is causing an error during asset generation which seems to be a fixed issue as documented here: rails/webpacker#530
You can simply update webpacker using |
Hey!
I've been having an issue deploying my app to Heroku.
Stack
.tsx
files )My output is this:
I'm not sure what config to provide to you at this point but am happy to.
I have tried many remedies (like postinstall > rebuild node-sass) but no cigar.
My
application.js
looks like this:If I change
Transaction
toTransaction.tsx
then webpack seems to be skipped altogether and no assets are built.My typescript webpack loader looks like this:
My
webpacker.yml
looks like this:My tsconfig looks like this:
I kinda have nothing left to try really. For the record, everything works perfectly locally.
Thanks in advance
The text was updated successfully, but these errors were encountered: