arco-design / arco-cli

CLI tool for Arco Design
https://arco.design/docs/material/guide
MIT License
203 stars 76 forks source link

创建组件库项目,构建失败 #62

Closed bqzhaoyan closed 11 months ago

bqzhaoyan commented 1 year ago

Describe the bug 创建组件库项目,构建失败

To Reproduce F:\vue3>arco init lib-project

    ___                    ____            _
   /   |  ______________  / __ \___  _____(_)___ _____
  / /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
 / ___ |/ /  / /__/ /_/ / /_/ /  __(__  ) / /_/ / / / /
/_/  |_/_/   \___/\____/_____/\___/____/_/\__, /_/ /_/
                                         /____/

                                            v1.27.4

? 请选择你希望使用的技术栈 Vue ? 请选择所要创建项目的类型 组件库 ? 请输入 NPM 包名 common-components ? 请输入物料标题 公共组件 ? 请描述你的物料 公共组件 ? 请输入 NPM 包版本号 0.1.0 ? 请选择物料的关键词(可多选) 数据展示

正在初始化项目于 F:\vue3\lib-project √ 获取项目模板成功 √ 模板内容拷贝完成 √ 模板内容适配完成 √ 项目依赖安装完成 ‼ 项目构建失败 Command executed failed: npm run build npm WARN config global --global, --local are deprecated. Use --location=global instead. npm WARN config global --global, --local are deprecated. Use --location=global instead. "build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format "build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format npm WARN config global --global, --local are deprecated. Use --location=global instead. "build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format You must supply options.input to rollup F:\vue3\lib-project\node_modules\rollup\dist\shared\rollup.js:23039 throw new Error('You must supply options.input to rollup'); ^

Error: You must supply options.input to rollup at Graph.generateModuleGraph (F:\vue3\lib-project\node_modules\rollup\dist\shared\rollup.js:23039:19) at async Graph.build (F:\vue3\lib-project\node_modules\rollup\dist\shared\rollup.js:22982:9) at async F:\vue3\lib-project\node_modules\rollup\dist\shared\rollup.js:23680:13 at async catchUnfinishedHookActions (F:\vue3\lib-project\node_modules\rollup\dist\shared\rollup.js:23162:20) at async rollupInternal (F:\vue3\lib-project\node_modules\rollup\dist\shared\rollup.js:23677:5) at async doBuild (F:\vue3\lib-project\node_modules\vite\dist\node\chunks\dep-689425f3.js:41710:24) at async build (F:\vue3\lib-project\node_modules\vite\dist\node\chunks\dep-689425f3.js:41552:16)

Desktop (please complete the following information):

MisterLuffy commented 1 year ago

为组件库添加组件后再重新构建呢?

echo-phper commented 11 months ago

我也是构建失败,且已经添加了组件

npm run build

> test-components@0.1.0 build
> npm run build:component && npm run build:style && npm run dtsgen

> test-components@0.1.0 build:component
> arco-vue-scripts build:material-library

node:internal/modules/cjs/loader:573
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/utils/getDoclets' is not defined by "exports" in /Users/echochiang/code/test-components/node_modules/vue-docgen-api/package.json
    at new NodeError (node:internal/errors:399:5)
    at exportsNotFound (node:internal/modules/esm/resolve:361:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
    at resolveExports (node:internal/modules/cjs/loader:567:36)
    at Module._findPath (node:internal/modules/cjs/loader:636:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/echochiang/code/test-components/node_modules/@arco-design/arco-vue-scripts/dist/scripts/docgen/slot-tag-handler.js:27:38) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v18.16.1
OS:  Mac OS
arco-cli v1.27.5