Skip to content

fix(simple-lock): mark @ckb-js-std/core as external to fix build error#773

Open
leothatguy wants to merge 1 commit intonervosnetwork:developfrom
leothatguy:fix/hash-lock-build-failure-in-simple-lock-dapp
Open

fix(simple-lock): mark @ckb-js-std/core as external to fix build error#773
leothatguy wants to merge 1 commit intonervosnetwork:developfrom
leothatguy:fix/hash-lock-build-failure-in-simple-lock-dapp

Conversation

@leothatguy
Copy link
Copy Markdown

Description

This PR resolves a build failure in the simple-lock dApp where esbuild was unable to resolve the @ckb-js-std/core dependency. By marking this dependency as external in the build script, we allow the bundling process to complete successfully, as this core library is expected to be provided by the runtime environment or handled separately.

Ticket Number

N/A

Changes Made

What was the issue?

Fix the build error encountered when running pnpm build:
✘ [ERROR] Could not resolve "@ckb-js-std/core"
The Yarn Plug'n'Play manifest forbids importing "@ckb-js-std/core" here because it's not listed as a dependency of this package

What did you do?

Updated scripts/build-contract.js to include --external:@ckb-js-std/core in the esbuild arguments. This ensures that esbuild does not attempt to bundle this package, resolving the "Could not resolve" error.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (changes that do not relate to a fix or feature and don't modify src or test files)

Check List

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR are clear and explain the approach.
  • I am making a pull request against the dev branch (left side).
  • My commit message style matches our requested structure.
  • My code additions will not fail code linting checks or unit tests.
  • I am only making changes to files I was requested to.

Images

  • The live component worked on: Build Successful (Verified with pnpm build)
image
  • Linting check (run pnpm lint): Format Successful (Verified with pnpm format, as lint script was not present in package.json)
image

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 30, 2026

@leothatguy is attempting to deploy a commit to the cryptape Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the simple-lock dApp contract build pipeline to avoid an esbuild module-resolution failure by treating @ckb-js-std/core as an external dependency during bundling.

Changes:

  • Add --external:@ckb-js-std/core to the esbuild invocation in the contract build script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants