coze-js icon indicating copy to clipboard operation
coze-js copied to clipboard

Bug: issues during the project building.

Open codyuan opened this issue 4 months ago • 1 comments

Here is the information when I try to build my project according to the Readme:

$ rush build
Found configuration in C:\Users\yuanye\Desktop\coze_proposal_website\rush.json


Rush Multi-Project Build Tool 5.140.0 - https://rushjs.io
Node.js version is 18.20.8 (LTS)


Starting "rush build"

The command line selection parameters did not match any projects.

Seems that the project isn't built correctly, cuz when I try

 const { CozeAPI } = await import("@coze/api");

there occurs an import error:

Uncaught:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@coze/api' imported from C:\Users\yuanye\De
sktop\coze_proposal_website\repl
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at packageResolve (node:internal/modules/esm/resolve:916:9)
    at moduleResolve (node:internal/modules/esm/resolve:973:20)
    at defaultResolve (node:internal/modules/esm/resolve:1206:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
    at ModuleLoader.import (node:internal/modules/esm/loader:336:34)
    at importModuleDynamically (node:repl:467:39)
    at importModuleDynamicallyWrapper (node:internal/vm/module:432:21)
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:176:14)
    at REPL1:1:29 {
  code: 'ERR_MODULE_NOT_FOUND'
}

codyuan avatar Aug 12 '25 06:08 codyuan

  • Please verify your Node.js and Rush versions match the repo requirements (Node 18+, Rush 5.140.0).
  • When running rush update, did any errors or warnings occur? If so, please share the logs.
  • Try building the specific package directly: rush build -t @coze/api.

chenyuliang-star avatar Sep 04 '25 07:09 chenyuliang-star