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

TS编译报错 #410

Closed
aak1247 opened this issue Oct 14, 2022 · 2 comments
Closed

TS编译报错 #410

aak1247 opened this issue Oct 14, 2022 · 2 comments

Comments

@aak1247
Copy link

aak1247 commented Oct 14, 2022

Do you want to request a feature or report a bug?
BUG
What is the current behavior?
编译结果:

● Client █████████████████████████ building (10%) 0/1 entries 1/1 dependencies 0/1 modules
 1 active 
 ...re@2.1.0_pwnuiv3g3btypm2f34oh4mineq/node_modules/@docusaurus/core/lib/client/clientEnt
ry.js

● Server █████████████████████████ building (10%) 0/1 entries 0/0 dependencies 0/0 modules
 0 active 
 

ℹ [TRANSFORM-ESM]  ⚡️ Build success in 1517.47 ms                                18:30:18

 ERROR  [TRANSFORM-ESM]  ⚠️ The transformed dist contains @swc/helpers, please make sure @swc/helpers is installed as a dependency.

npm ERR! Lifecycle script `build` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace:xx@1.0.0 
npm ERR!   at location: xxxxr

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  • Iceworks CLI version:
    "@ice/pkg": "^1.0.0",
    "@ice/pkg-plugin-docusaurus": "^1.0.0",
    "@iceworks/spec": "^1.0.0",
  • Node verson:v18.10.0
  • Platform:
    lsb_release:
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.4 LTS
    Release: 20.04
    Codename: focal
    uname -a: Linux alex 5.10.60.1-microsoft-standard-WSL2 iceworks初始化的物料库,多包场景希望增加lerna支持 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

tsconfig默认配置
build.config.js:

export default defineConfig({
  plugins: [
    '@ice/pkg-plugin-docusaurus',
  ],
  bundle: {
    formats: ['esm', 'es2017'],
    externals: {
      react: 'React',
      'react-dom': 'ReactDOM',
    },
  },
});
@aak1247
Copy link
Author

aak1247 commented Oct 14, 2022

似乎是语法支持问题,实测有abstract class就会报错

@aak1247
Copy link
Author

aak1247 commented Oct 14, 2022

加依赖以后好了=默认加了dev依赖,我的锅

@aak1247 aak1247 closed this as completed Oct 14, 2022
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

1 participant