brick-design/brick-design

npm run start:examle直接报错

liuruizhe opened this issue · 6 comments

yarn run build exited 2 in '@brickd/utils'

根目录使用yarn install 初始化项目

我是这个报错
执行顺序: yarn install && npm run start:example

@brickd/react: yarn run v1.22.10
@brickd/react: $ tsc && rollup -c rollup.config.js
@brickd/react: src/components/BrickProvider/index.tsx(22,13): error TS2345: Argument of type '() => () => () => void' is not assignable to parameter of type 'EffectCallback'.
@brickd/react:   Type '() => () => void' is not assignable to type 'void | Destructor'.
@brickd/react:     Type '() => () => void' is not assignable to type 'Destructor'.
@brickd/react:       Type '() => void' is not assignable to type 'void | { [UNDEFINED_VOID_ONLY]: never; }'.
@brickd/react:         Property '[UNDEFINED_VOID_ONLY]' is missing in type '() => void' but required in type '{ [UNDEFINED_VOID_ONLY]: never; }'.
@brickd/react: error Command failed with exit code 2.
@brickd/react: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build exited 2 in '@brickd/react'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! root@ start:example: `lerna run build --stream && lerna run start`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the root@ start:example script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/houlinjiang/.npm/_logs/2021-04-02T06_57_45_281Z-debug.log

可能跟系统有关系,可以尝试一下,yarn install 然后执行 npm run build-all 然后进入 example react目录执行npm run start

能提供一下 node、yarn.lock 版本么, build 也是失败的

➜  react git:(master) ✗ npm run build

> @brickd/react@1.0.0-alpha.16 build /Users/houlinjiang/workspace/low-code/brick-design/packages/react
> tsc && rollup -c rollup.config.js

error TS5023: Unknown compiler option 'baseUrl'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @brickd/react@1.0.0-alpha.16 build: `tsc && rollup -c rollup.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @brickd/react@1.0.0-alpha.16 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/houlinjiang/.npm/_logs/2021-04-02T07_33_17_494Z-debug.log

进群发个你

可能跟系统有关系,可以尝试一下,yarn install 然后执行 npm run build-all 然后进入 example react目录执行npm run start

跑不起来