[BUG] ERROR Template execution failed: [object Promise]
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behaviour?
If the current behaviour is a bug, please provide the steps to reproduce.
I’m getting the below error when building:
❯ pnpm run docs-build
> gdpr-cookie-consent-banner@1.0.0 docs-build /Users/marvinheilemann/Development/CookieConsent
> preact build --src src/docs --dest docs
Build [=================== ] 95% (3.7s) emitting ← this is also weird, that it is showing here and below
ssr-bundle.c5386.css ⏤ 2.29 kB (+2.29 kB)
ssr-bundle.js ⏤ 14.1 kB (+14.1 kB)
1.chunk.d45ff.css ⏤ 611 B (+611 B)
1.chunk.*****.js ⏤ 23.9 kB (+23.9 kB)
2.chunk.72a4d.css ⏤ 940 B (+940 B)
2.chunk.*****.js ⏤ 2.7 kB (+2.7 kB)
3.chunk.94ba8.css ⏤ 920 B (+920 B)
3.chunk.*****.js ⏤ 2.35 kB (+2.35 kB)
4.chunk.c9920.css ⏤ 66 B (+66 B)
4.chunk.*****.js ⏤ 360 B (+360 B)
ℹ INFO ⚛️ No custom sw.js detected: compiling default Service Worker.
Build [=================== ] 95% (6.3s) emitting
sw-esm.js ⏤ 748 B (+748 B)
sw.js ⏤ 745 B (+745 B)
bundle.c5386.css ⏤ 1.44 kB (+1.44 kB)
bundle.87f72.esm.js ⏤ 17.8 kB (+17.8 kB)
polyfills.fb90e.esm.js ⏤ 2.01 kB (+2.01 kB)
route-credits.chunk.c9920.css ⏤ 0 B
route-credits.chunk.c3e95.esm.js ⏤ 381 B (+381 B)
route-home.chunk.d45ff.css ⏤ 561 B (+561 B)
route-home.chunk.ee00f.esm.js ⏤ 23.9 kB (+23.9 kB)
4.chunk.72a4d.css ⏤ 889 B (+889 B)
4.chunk.e2aaa.esm.js ⏤ 2.67 kB (+2.67 kB)
5.chunk.94ba8.css ⏤ 866 B (+866 B)
5.chunk.c290d.esm.js ⏤ 2.32 kB (+2.32 kB)
6.chunk.ac7c6.esm.js ⏤ 484 B (+484 B)
7.chunk.bd85b.esm.js ⏤ 483 B (+483 B)
bundle.c9333.js ⏤ 17.8 kB (+17.8 kB)
polyfills.64298.js ⏤ 2.01 kB (+2.01 kB)
route-credits.chunk.ea3d0.js ⏤ 380 B (+380 B)
route-home.chunk.8132e.js ⏤ 23.9 kB (+23.9 kB)
4.chunk.18dd8.js ⏤ 2.69 kB (+2.69 kB)
5.chunk.06fe4.js ⏤ 2.35 kB (+2.35 kB)
6.chunk.7f199.js ⏤ 486 B (+486 B)
7.chunk.47f27.js ⏤ 485 B (+485 B)
✖ ERROR Template execution failed: [object Promise]
ERROR Command failed with exit code 1.
Development build with preact watch --src src/docs
works and using --no-prerender
gives this output:
> gdpr-cookie-consent-banner@1.0.0 docs-build /Users/marvinheilemann/Development/CookieConsent
> preact build --src src/docs --dest docs "--no-prerender"
ℹ INFO ⚛️ No custom sw.js detected: compiling default Service Worker.
Build [=================== ] 95% (8.0s) emitting
sw-esm.js ⏤ 748 B (+748 B)
sw.js ⏤ 745 B (+745 B)
bundle.c5386.css ⏤ 1.44 kB (+1.44 kB)
bundle.87f72.esm.js ⏤ 17.8 kB (+17.8 kB)
polyfills.fb90e.esm.js ⏤ 2.01 kB (+2.01 kB)
route-credits.chunk.c9920.css ⏤ 0 B
route-credits.chunk.c3e95.esm.js ⏤ 381 B (+381 B)
route-home.chunk.d45ff.css ⏤ 561 B (+561 B)
route-home.chunk.ee00f.esm.js ⏤ 23.9 kB (+23.9 kB)
4.chunk.72a4d.css ⏤ 889 B (+889 B)
4.chunk.e2aaa.esm.js ⏤ 2.67 kB (+2.67 kB)
5.chunk.94ba8.css ⏤ 866 B (+866 B)
5.chunk.c290d.esm.js ⏤ 2.32 kB (+2.32 kB)
6.chunk.ac7c6.esm.js ⏤ 484 B (+484 B)
7.chunk.bd85b.esm.js ⏤ 483 B (+483 B)
bundle.c9333.js ⏤ 17.8 kB (+17.8 kB)
polyfills.64298.js ⏤ 2.01 kB (+2.01 kB)
route-credits.chunk.ea3d0.js ⏤ 380 B (+380 B)
route-home.chunk.8132e.js ⏤ 23.9 kB (+23.9 kB)
4.chunk.18dd8.js ⏤ 2.69 kB (+2.69 kB)
5.chunk.06fe4.js ⏤ 2.35 kB (+2.35 kB)
6.chunk.7f199.js ⏤ 486 B (+486 B)
7.chunk.47f27.js ⏤ 485 B (+485 B)
⚠ WARN Conflict: Multiple assets emit different content to the same filename bundle.c5386.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename route-credits.chunk.c9920.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename route-home.chunk.d45ff.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename 4.chunk.72a4d.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename 5.chunk.94ba8.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename bundle.c5386.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename route-credits.chunk.c9920.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename route-home.chunk.d45ff.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename 4.chunk.72a4d.css
⚠ WARN Conflict: Multiple assets emit different content to the same filename 5.chunk.94ba8.css
Repository: https://github.com/muuvmuuv/cookie-consent/tree/next/src/docs
What is the expected behaviour?
If this is a feature request, what is motivation or use case for changing the behaviour?
Please mention other relevant information.
Please paste the results of preact info
here. ← does not work
preact-cli 2.2.1
...
Unbekanntes Argument: info
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unhandled error during execution of scheduler flush. This is ...
Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not...
Read more >JavaScript Promise Tutorial – How to Resolve or Reject ...
This method waits for all the promises to resolve and returns the array of promise results. If any of the promises reject or...
Read more >Using promises - JavaScript - MDN Web Docs
A Promise is an object representing the eventual completion or failure of an asynchronous operation. Since most people are consumers of ...
Read more >Best Practices for Node.js Error-handling - Toptal
This article will introduce you to error-handling in Node.js and demonstrate ... Using Node.js built-in Error object is a good practice because it...
Read more >Resolving the JavaScript Promise Error "TypeError: Cannot ...
In this guide, we will cover two code examples containing a bugs that cause this TypeError and then refactor the code to resolve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The reason is that the prerendering work in node environment and does not wait for async operations to be over.
If you want you can wrap it in an if condition and make sure that it is not reachable in prerendering flow
The progress indicator showing up twice is probably conflicting logging preventing it from getting cleared