Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初始化项目后 选择组件库 yarn run dev启动一直loading #85

Open
zhang1024899756 opened this issue Aug 9, 2023 · 3 comments

Comments

@zhang1024899756
Copy link

Describe the bug
初始化项目后yarn run dev启动一直loading

To Reproduce
Steps to reproduce the behavior:

  1. arco init test-pro 选择Vue 组件库
  2. cd test-pro && yarn
  3. yarn run add:component button
  4. yarn run dev

Expected behavior
正常启动

Screenshots
image
image

"devDependencies": {
    "@arco-design/arco-vue-scripts": "latest",
    "@arco-design/web-vue": "~2",
    "@babel/core": "^7.14.6",
    "@babel/plugin-proposal-class-properties": "^7.14.5",
    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
    "@babel/preset-env": "^7.14.7",
    "@babel/preset-typescript": "^7.14.5",
    "@commitlint/cli": "^11.0.0",
    "@commitlint/config-conventional": "^12.0.1",
    "@storybook/addon-actions": "^6.3.0",
    "@storybook/addon-essentials": "^6.3.0",
    "@storybook/addon-links": "^6.3.0",
    "@storybook/builder-webpack5": "^6.5.9",
    "@storybook/manager-webpack5": "^6.5.9",
    "@storybook/vue3": "^6.3.0",
    "@types/fs-extra": "^9.0.6",
    "@typescript-eslint/eslint-plugin": "^4.18.0",
    "@typescript-eslint/parser": "^4.12.0",
    "@vue/babel-plugin-jsx": "^1.0.6",
    "@vue/test-utils": "^2.0.0-beta.14",
    "babel-loader": "^8.2.2",
    "eslint": "^7.21.0",
    "eslint-config-airbnb-base": "^14.2.1",
    "eslint-config-prettier": "^8.3.0",
    "eslint-import-resolver-typescript": "^2.4.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-vue": "^7.7.0",
    "fast-glob": "^3.2.7",
    "fs-extra": "^9.1.0",
    "husky": "^4.3.7",
    "less": "^4.1.1",
    "less-loader": "^7.3.0",
    "lint-staged": "^10.5.3",
    "prettier": "^2.2.1",
    "stylelint": "^13.8.0",
    "stylelint-config-prettier": "^8.0.2",
    "stylelint-config-rational-order": "^0.1.2",
    "stylelint-config-standard": "^20.0.0",
    "stylelint-order": "^4.1.0",
    "typescript": "^4.2.4",
    "vue": "^3.2.0",
    "vue-loader": "^16.2.0"
  }

Desktop (please complete the following information):
image

  • OS: [e.g. MacOS]

Additional context
Add any other context about the problem here.

@zhang1024899756
Copy link
Author

zhang1024899756 commented Aug 14, 2023

将.storybook/preview.js文件调整了以后,可以正常dev,参照,但是build遇到了同样的问题参照

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/utils/getDoclets' is not defined by "exports" in Desktop/text-pro/node_modules/vue-docgen-api/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
at resolveExports (node:internal/modules/cjs/loader:522:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:562:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:971:27)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (Desktop/text-pro/node_modules/@arco-design/arco-vue-scripts/dist/scripts/docgen/slot-tag-handler.js:27:38) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error Command failed with exit code 1.

@zhang1024899756
Copy link
Author

zhang1024899756 commented Aug 14, 2023

vue-docgen-api中发现需要版本升级
It seems to be an issue caused by support for ESM #1540

然后将

import getDoclets from 'vue-docgen-api/dist/utils/getDoclets';
import getProperties from 'vue-docgen-api/dist/script-handlers/utils/getProperties';
import getDocblock from 'vue-docgen-api/dist/utils/getDocblock';

改为

import {
  Documentation,
  getDoclets,
  getProperties,
  getDocblock,
} from 'vue-docgen-api';

@y1324
Copy link

y1324 commented Aug 30, 2023

vue-docgen-api中发现需要版本升级 It seems to be an issue caused by support for ESM #1540

然后将

import getDoclets from 'vue-docgen-api/dist/utils/getDoclets';
import getProperties from 'vue-docgen-api/dist/script-handlers/utils/getProperties';
import getDocblock from 'vue-docgen-api/dist/utils/getDocblock';

改为

import {
  Documentation,
  getDoclets,
  getProperties,
  getDocblock,
} from 'vue-docgen-api';

解决了吗?我没找到 import getDoclets from 'vue-docgen-api/dist/utils/getDoclets'; 上面这三个导入

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

No branches or pull requests

2 participants