-
Notifications
You must be signed in to change notification settings - Fork 62
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
[webpacker] Compilation failed with no error output #949
Comments
@joshuap I can reproduce the "compilation failed", it's also worth noting that it appears in 3 different ways across Node 14, 16, 18. Node 14: Silent compilation failure Heres what I get on Node 16.18.1 : rm -rf public/packs && rm -rf tmp/packs && RAILS_ENV=production HONEYBADGER_API_KEY="KEY" bundle exec rails webpacker:com
pile
You don't have net-smtp installed in your application. Please add it to your Gemfile and run bundle install
Compiling...
Compilation failed:
pausing..
done pausing...
pausing..
done pausing...
Hash: 6e6af88c89b5fa371c8c
Version: webpack 4.46.0
Time: 2447ms
Built at: 11/18/2022 10:06:36 PM
Asset Size Chunks Chunk Names
js/application-cf5cff6beef247ac09a5.js 68.3 KiB 0 [emitted] [immutable] application
js/application-cf5cff6beef247ac09a5.js.br 15.2 KiB [emitted]
js/application-cf5cff6beef247ac09a5.js.gz 17.5 KiB [emitted]
js/application-cf5cff6beef247ac09a5.js.map 203 KiB 0 [emitted] [dev] application
js/application-cf5cff6beef247ac09a5.js.map.br 43.3 KiB [emitted]
js/application-cf5cff6beef247ac09a5.js.map.gz 50 KiB [emitted]
manifest.json 364 bytes [emitted]
manifest.json.br 128 bytes [emitted]
manifest.json.gz 142 bytes [emitted]
Entrypoint application = js/application-cf5cff6beef247ac09a5.js js/application-cf5cff6beef247ac09a5.js.map
[3] ./app/javascript/packs/application.js 507 bytes {0} [built]
[4] ./app/javascript/channels/index.js 205 bytes {0} [built]
[5] ./app/javascript/channels sync _channel\.js$ 160 bytes {0} [built]
+ 3 hidden modules
ERROR in HoneybadgerSourceMapPlugin: failed to upload js/application-cf5cff6beef247ac09a5.js.map to Honeybadger API: Invalid host defined options However, when I just run a standard: Even more bizarre heres what I get in Node 18.9.0
^ the above I was able to solve by doing the following:
I'm not 100% what's going on here. Also of note, the "webpacker:compile" trick doesnt work in Node 14 and produces the error seen above that you originally posted. Node 14 seems to be a no-op, most likely an unsupported module or function if I had to guess. |
Hey @KonnorRogers, I googled around for the
If this fixes it, we will have a better idea on where to debug. Regarding the Nodejs v18 error, I also looked around and it seems that this is a known problem since node v17 and outdated dependencies. The env variable you used I suggest we ignore the node v14 case for now, it may even be fixed if we deal with the above. Let me know if I can help in any way! |
@KonnorRogers Update: |
Alright, in further testing the "invalid API host options" is from "node-fetch-retry". "node-fetch-retry" only gets about ~11k downloads/week and seems to be much less ubiquitous compared to: https://www.npmjs.com/package/fetch-retry which gets ~3million downloads/week. I swapped the webpack project to use "fetch-retry" and it appears to work without any workarounds. EDIT: #952 should fix this based on testing locally. |
Awesome! I'm so glad it didn't turn out to be a bug from the monorepo transition 😌 . |
@subzero10 i really have no idea where the bug is actually hiding, I commented everything out and narrowed it down to the 1 package, it have no idea what was causing it. Bizarre that it worked with the previous version. Oh well 🤷♂️ |
The newer version has updated dependencies, I'm guessing there's a compatibility issue somewhere. We could dig deeper but I don't see the point now. Let's merge and test this once more with a patched version of the package. |
Great work you two! |
This should be fixed with
|
What are the steps to reproduce this issue?
What happens?
It compiles but fails to upload source maps.
What were you expecting to happen?
It should compile successfully and upload the source maps to my Honeybadger project.
Any logs, error output, etc?
What versions are you using?
Operating System: macOS Monterey 12.6
Package Name: @honeybadger-io/webpack
Package Version: 4.7.1
Front conversations
The text was updated successfully, but these errors were encountered: