🐛 parcel build fails with UnhandledPromiseRejectionWarning on Netlify
See original GitHub issueI think this is actually an issue on Netlify’s end as Parcel 1.5.1 works fine on my computer, but this issue doesn’t happen with other build systems, so I’m not sure. Their support says they don’t have enough time to look into why, but there’s a Docker instance that developers can try on.
🤔 Expected Behavior
parcel build
should function properly and not return an error.
😯 Current Behavior
6:17:38 PM: $ parcel build --public-url / index.html
6:17:39 PM: (node:906) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module './SourceMapPackager'
6:17:39 PM: Done in 0.68s.
💁 Possible Solution
I’m not sure, it seems that SourceMapPackager was introduced in 1.5. Maybe explicitly add the filename extension? Could it also be different behavior between Node versions? Is there a possibility that filenames containing “SourceMap” are deleted for whatever reason (unlikely but possible)?
🔦 Context
I’m trying to deploy applications on Netlify with Parcel 1.5 but I can’t. Have to downgrade to Parcel 1.4, which does work 😦
💻 Code Sample
N/A, but this does happen with https://github.com/yunyu/parcel-duplicate-module-reprod
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 1.5.1 |
Node | 6.12.3 |
npm/Yarn | yarn 0.18.1 (this also happens with 1.3.2) |
Operating System | Linux x64 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Yeah, I can confirm that it works with Node 8. Thanks!
Actually, I set the
NODE_VERSION
environment variable tov8.9.4
in Netlify’s control panel, and the build works now. (I should have tried it first, didn’t know until after I filed this issue though).Should I retitle this to say that it likely fails on v6.12.x? A possible workaround would just be to mention this in the docs, if Parcel doesn’t intend to support older LTSes.