question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 parcel build fails with UnhandledPromiseRejectionWarning on Netlify

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
huerlisicommented, Feb 8, 2018

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

1reaction
yunyucommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy To Netlify Fails With Parcel - Support
I build a website with parcel-bundler and it keeps failing to build with the same error with a plugin issue. The website works...
Read more >
Build error with parcel on Netlify - Support
I tried to add CI= before npm run build but it doesn't work. The last error displayed is: Failed during stage 'building site':...
Read more >
Can't deploy website with parcel - Netlify Support Forums
I build a website with parcel and it keeps failing to build with the same error. The website works on my local server....
Read more >
Deployment error build.command failed - Netlify Support Forums
Part of the issue too is parcel is listed under devDependencies instead of dependencies . As you are trying to build using parcel,...
Read more >
Deploy To Netlify Fails With Parcel.Js - ADocLib
In case your build fails on Netlify first make sure it builds locally in your own It can be challenging to effectively change...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found