bolt.diy: Problem Temporarily Solved, Not Fix: Error building my application

Describe the bug

✘ [ERROR] Build failed with 5 errors:

  ✘ [ERROR] Could not resolve "child_process"

      ../build/server/index.js:25:31:
        25 │ import { execSync, exec } from 'child_process';
           ╵                                ~~~~~~~~~~~~~~~

    The package "child_process" wasn't found on the file system but is built into node. Are you
  trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this
  error.


  ✘ [ERROR] Could not resolve "crypto"

      ../build/server/index.js:29:19:
        29 │ import crypto from 'crypto';
           ╵                    ~~~~~~~~

    The package "crypto" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


  ✘ [ERROR] Could not resolve "util"

      ../build/server/index.js:31:26:
        31 │ import { promisify } from 'util';
           ╵                           ~~~~~~

    The package "util" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


  ✘ [ERROR] Could not resolve "crypto"

      ../node_modules/.pnpm/cookie-signature@1.2.2/node_modules/cookie-signature/index.js:5:21:
        5 │ var crypto = require('crypto');
          ╵                      ~~~~~~~~

    The package "crypto" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


  ✘ [ERROR] Could not resolve "stream"

      ../node_modules/.pnpm/stream-slice@0.1.2/node_modules/stream-slice/index.js:3:24:
        3 │ var Transform = require('stream').Transform;
          ╵                         ~~~~~~~~

    The package "stream" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


✘ [ERROR] Failed to build Functions at ./functions.


🪵  Logs were written to "/home/bolt/.config/.wrangler/logs/wrangler-2025-03-02_01-55-15_331.log"
 ELIFECYCLE  Command failed with exit code 1.

Link to the Bolt URL that caused the error

https://github.com/stackblitz-labs/bolt.diy/releases/tag/v0.0.7

Steps to reproduce

pnpm run build && pnpm run start

Expected behavior

Complete build

Screen Recording / Screenshot

No response

Platform

  • OS: [Linux - Ubuntu 24.04]
  • Browser: [Chrome]
  • Version: [0.0.7]

Provider Used

No response

Model Used

No response

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28

Commits related to this issue

Most upvoted comments

@viethoang1520 no, its not even on main at the moment. Just asked @thecodacus to review it again, as @Stijnus did one more fix. If this goes through his review, we can merge to main and do a hotfix for stable.

@viethoang1520 Yes bro, for me everything is working now, I am tagging you as requested, but it is possible that some errors may appear, but we will be here to help. ⚡

Follow the instructions in this Youtube Tutorial DIY Smart Code 👨‍💻, if you also want to make your own web version. But remember to change the PR for it to work normally.

Checkout with GitHub CLI Command:

gh pr checkout 1436

Special thanks to everyone who helped with this issue. ⚡

@leex279 , @Stijnus , @xKevIsDev , @Tryanks , @kamilfurtak , @morningxm

The team has a quick fix for this in progress. Will circle back here once it has been merged

✓ built in 1.96s
✘ [ERROR] Build failed with 2 errors:

  ✘ [ERROR] Could not resolve "crypto"

      ../node_modules/.pnpm/cookie-signature@1.2.2/node_modules/cookie-signature/index.js:5:21:
        5 │ var crypto = require('crypto');
          ╵                      ~~~~~~~~

    The package "crypto" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


  ✘ [ERROR] Could not resolve "stream"

      ../node_modules/.pnpm/stream-slice@0.1.2/node_modules/stream-slice/index.js:3:24:
        3 │ var Transform = require('stream').Transform;
          ╵                         ~~~~~~~~

    The package "stream" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.





✘ [ERROR] Build failed with 2 errors:

  ✘ [ERROR] Could not resolve "crypto"

      ../node_modules/.pnpm/cookie-signature@1.2.2/node_modules/cookie-signature/index.js:5:21:
        5 │ var crypto = require('crypto');
          ╵                      ~~~~~~~~

    The package "crypto" wasn't found on the file system but is built into node.
    - Make sure to prefix the module name with "node:" or update your compatibility_date to
  2024-09-23 or later.



  ✘ [ERROR] Could not resolve "stream"

      ../node_modules/.pnpm/stream-slice@0.1.2/node_modules/stream-slice/index.js:3:24:
        3 │ var Transform = require('stream').Transform;
          ╵                         ~~~~~~~~

    The package "stream" wasn't found on the file system but is built into node.
    - Make sure to prefix the module name with "node:" or update your compatibility_date to
  2024-09-23 or later.





🪵  Logs were written to "C:\Users\cross\AppData\Roaming\xdg.config\.wrangler\logs\wrangler-2025-03-27_03-32-22_695.log"
 ELIFECYCLE  Command failed with exit code 1.

Keep getting this error. Seems to be related

Hi @dillfrescott can you test the new PR : https://github.com/stackblitz-labs/bolt.diy/pull/1567

@zeneiltongpdev I reopened. Let it please open until we merge a final solution to the main branch, which we will then also bring as hotfix to the stable branch.

@zeneiltongpdev please tag me if it is resolved, thank you so much.

@Tryanks yes it works now. Stinjus did another Commit in the meantime, but I am not sure yet if it not broke something else (at least in the “Debug” Tab in Settings, I see that the information request is not working. But other then that it works.

Topic is also here a bit covered/discussed: https://thinktank.ottomator.ai/t/how-to-upgrade-bold-diy-to-v0-0-7-on-cloudflare/6010/8

@morningxm yeah, got the same with the PR from @Stijnus. But I am confident he will find a solution for this as well 😃