ant-design / ant-design-icons

⭐ Ant Design SVG Icons
https://ant.design/components/icon/
MIT License
960 stars 582 forks source link

icons-svg build error #500

Closed chenyulun closed 2 years ago

chenyulun commented 2 years ago
➜  ant-design-icons git:(master) cd packages/icons-svg 
➜  icons-svg git:(master) yarn build
yarn run v1.22.15
$ cross-env NODE_ENV=production && npm run build:es && npm run build:lib

> @ant-design/icons-svg@4.2.1 build:es
> tsc --project tsconfig.build.json --module esnext --outDir es

error TS18003: No inputs were found in config file '/Users/xxxxxx/github/ant-design-icons/packages/icons-svg/tsconfig.build.json'. Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were '[]'.

Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
➜  icons-svg git:(master) node -v
v16.4.2
➜  icons-svg git:(master) npm -v
7.18.1
➜  icons-svg git:(master) yarn -v
1.22.15
➜  icons-svg git:(master) yarn tsc -v
yarn run v1.22.15
Version 3.9.10
✨  Done in 1.18s.
chenyulun commented 2 years ago
"scripts": {
    "g": "npm run generate",
    "generate": "cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only",
    "type-check": "tsc --noEmit",
    "build:es": "tsc --project tsconfig.build.json --module esnext --outDir es",
    "build:lib": "tsc --project tsconfig.build.json --module commonjs --outDir lib",
-    "build": "cross-env NODE_ENV=production && npm run build:es && npm run build:lib",
+    "build": "cross-env NODE_ENV=production && npm run g && npm run build:es && npm run build:lib",
    "test": "cross-env NODE_ENV=test && npm run test:unit",
    "test:unit": "jest",
    "prepublishOnly": "npm run test && npm run g && npm run build && npm run type-check && npm run digest",
    "digest": "node scripts/digest.js"
  },
chenyulun commented 2 years ago

我需要先执行icons:generate,建议内部写prebuild命令比较好的

chenyulun commented 2 years ago

vue:ci

> @ant-design/icons-vue@6.0.1 postcompile
> npm run clean && TS_NODE_PROJECT=scripts/tsconfig.json node -r ts-node/register scripts/generate.ts --target=entry

> @ant-design/icons-vue@6.0.1 clean
> ./scripts/cleanup.sh

> @ant-design/icons-vue@6.0.1 test
> cross-env NODE_ENV=test jest --config .jest.js

  console.error
    Warning: [@ant-design/icons-vue] Should have `component` prop/slot or `children`.

      29 |   // Support uglify
      30 |   if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
    > 31 |     console.error("Warning: ".concat(message));
         |             ^
      32 |   }
      33 | }
      34 |

      at warn (lib/utils.js:31:13)
      at warning (lib/utils.js:36:3)
      at Icon (lib/components/Icon.js:39:22)
      at renderComponentRoot (node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:456:19)
      at ReactiveEffect.componentUpdateFn [as fn] (node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4154:57)
      at ReactiveEffect.run (node_modules/@vue/reactivity/dist/reactivity.cjs.js:164:29)
      at setupRenderEffect (node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4280:9)

  console.error
    Warning: [@ant-design/icons-vue] Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon.

      29 |   // Support uglify
      30 |   if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
    > 31 |     console.error("Warning: ".concat(message));
         |             ^
      32 |   }
      33 | }
      34 |

      at warn (lib/utils.js:31:13)
      at warning (lib/utils.js:36:3)
      at renderInnerNode (lib/components/Icon.js:78:26)
      at Icon (lib/components/Icon.js:99:8)
      at renderComponentRoot (node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:456:19)
      at ReactiveEffect.componentUpdateFn [as fn] (node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4154:57)
      at ReactiveEffect.run (node_modules/@vue/reactivity/dist/reactivity.cjs.js:164:29)

lerna success run Ran npm script 'ci' in 1 package in 50.6s:
lerna success - @ant-design/icons-vue
✨  Done in 54.94s.