parcel: UnhandledPromiseRejectionWarning when building.

Hi. As many others I am very excited for the work you are doing here. Badly needed. I have stumpled upon a slight problem building even just the simplest html file:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <p>Hello...</p>
  </body>
</html>

After running parcel index.html, the “dist” folder is created but it is empty. The following is the console errors:

Server running at http://localhost:1234
⏳  Building index.html...
(node:11164) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3001): RangeError: Maximum call stack size exceeded
(node:11164) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 13
  • Comments: 18 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Published v1.0.3.

@thejameskyle exactly, I created a PR https://github.com/parcel-bundler/parcel/pull/48 which fix it but test are still failing. We should integrate CI.

In src/utils/config.js#L10, I did: replace filepath === root with filepath === root || filepath === path.dirname(filepath), then I run test again, got these:

> mocha

css √ should produce two bundles when importing a CSS file (2301ms) √ should support loading a CSS bundle along side dynamic imports (1234ms) √ should support importing CSS from a CSS file √ should support linking to assets with url() from CSS 1) should support transforming with postcss √ should minify CSS in production mode (325ms)

fs √ should inline a file as a string √ should inline a file as a buffer (113ms) √ should inline a file with fs require alias √ should inline a file with fs require inline √ should inline a file with fs require assignment √ should inline a file with fs require assignment alias √ should inline a file with fs require destructure √ should inline a file with fs require destructure assignment

glob 2) should require a glob of files 3) should require nested directories with a glob 4) should support importing a glob of CSS files

hmr √ should emit an HMR update for the file that changed (207ms) 5) “before each” hook for “should emit an HMR update for all new dependencies along with the changed file”

14 passing (5s) 5 failing

  1. css should support transforming with postcss:

    AssertionError [ERR_ASSERTION]: ‘_index_1cehs_1’ == ‘_index_1ezyc_1’

    • expected - actual

    -_index_1cehs_1 +_index_1ezyc_1

    at Context.<anonymous> (test\css.js:119:12) at <anonymous>

  2. glob should require a glob of files: TypeError: Cannot read property ‘name’ of undefined at assertBundleTree (test\utils.js:63:39) at Context.<anonymous> (test\glob.js:9:5) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)

  3. glob should require nested directories with a glob: TypeError: Cannot read property ‘name’ of undefined at assertBundleTree (test\utils.js:63:39) at Context.<anonymous> (test\glob.js:23:5) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)

  4. glob should support importing a glob of CSS files: TypeError: Cannot read property ‘name’ of undefined at assertBundleTree (test\utils.js:63:39) at Context.<anonymous> (test\glob.js:37:5) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)

  5. “before each” hook for “should emit an HMR update for all new dependencies along with the changed file”: Error: ENOTEMPTY: directory not empty, rmdir ‘D:\inbox\parcel\test\dist’ at Object.fs.rmdirSync (fs.js:846:18) at rmkidsSync (node_modules\rimraf\rimraf.js:356:25) at rmdirSync (node_modules\rimraf\rimraf.js:334:7) at Function.rimrafSync [as sync] (node_modules\rimraf\rimraf.js:304:9) at Context.<anonymous> (test\utils.js:10:10)

I followed the getting started and had the same results. Sample repo here: https://github.com/mwarger/parcel-getting-started-windows

Windows 10

parcel 1.0.1
node 9.2.0

Confirming this happens to me as well. Node 9.1.0