Skip to content

Unhandled promise rejection when building on Windows #723

Closed
@davepagurek

Description

@davepagurek

Most appropriate sections of the p5.js website?

Other (specify if possible)

What is your operating system?

Windows

Web browser and version

N/A

Actual Behavior

When running npm run dev on Windows, we sometimes encounter this error:

Astro detected an unhandled rejection. Here's the stack trace:
Error: Build failed with 1 error:
node_modules/@swc/html/binding.js:101:31: ERROR: No loader is configured for ".node" files: node_modules/@swc/html-win32-x64-msvc/swc-html.win32-x64-msvc.node
    at failureErrorWithLog (C:\dev\p5.js-website\node_modules\esbuild\lib\main.js:1651:15)
    at C:\dev\p5.js-website\node_modules\esbuild\lib\main.js:1059:25
    at C:\dev\p5.js-website\node_modules\esbuild\lib\main.js:1527:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@lukeplowden just encountered this, and it was also reported a month ago here #698 (comment) although we weren't able to reproduce it reliably.

This error seems flaky: rerunning the server again, it didn't happen for Luke.

Some possible next steps here:

  • Can we figure out under what circumstances this error triggers, so that we can debug it further?
  • In Copy Button Issue with Multiple Syntax Signatures in Reference Page #698 (comment), the error weas bypassed by commenting out code that used the @swc/html library. If that is indeed the cause, are there ways we can avoid using this library?
  • Can we offer alternative instructions for Windows users, either running through Docker or WSL?

Expected Behavior

Ideally we have no errors when building 🙂

Steps to reproduce

Not sure yet, if anyone figures out exactly what circumstances lead to this, that would help!

Would you like to work on the issue?

I don't actually have Windows myself so I'm unable to work on this

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions