Skip to content
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

🐛 parcel build fails with UnhandledPromiseRejectionWarning on Netlify #700

Closed
yunyu opened this issue Jan 30, 2018 · 8 comments
Closed

Comments

@yunyu
Copy link

yunyu commented Jan 30, 2018

I 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
@davidnagli
Copy link
Contributor

What Node version / OS is Netlify using behind the scenes?

@yunyu
Copy link
Author

yunyu commented Jan 30, 2018

According to their support and the build logs, it's Node 6.12.3 running on Linux amd64. I've tested on a VPS running Node 8.9.4 and Linux amd64, which doesn't exhibit this issue. I suspect it's them having an improper cleanup mechanism, which is unfortunate (but they're still one of the most convenient ways to deploy frontend projects).

I will be trying this after setting modern Node and yarn versions.

@yunyu
Copy link
Author

yunyu commented Jan 30, 2018

Actually, I set the NODE_VERSION environment variable to v8.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.

@davidnagli
Copy link
Contributor

davidnagli commented Jan 30, 2018

Ok ya that seems to be the issue. We currently have some problems with supporting Node 6. It’s been something that we’ve been working on for a while, and it’s certainly a priority for us to support older versions, but at the moment we still have some subtle kinks with Node 6 that haven’t been worked out yet.

For more reference see: #648 #693 #253 #246

@davidnagli
Copy link
Contributor

I think we should leave this issue open for tracking since this is the first time seeing this error with SourceMapPackager

@huerlisi
Copy link

huerlisi commented Feb 8, 2018

I see the same with node version v7.10.1 and npm 5.6.0

@DeMoorJasper
Copy link
Member

This is not an issue with SourceMapPackager, it is an issue with node 6 support, node 7 is not supported either.
Parcel is Node 8+
Although we are working on Supporting Node 6 i'll close this issue as progress can be tracked here #253

@huerlisi
Copy link

huerlisi commented Feb 8, 2018

Yeah, I can confirm that it works with Node 8. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants