arco-design / arco-cli

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

clone 之后,本地无法构建成功 /bin/sh: arco-scripts: command not found #6

Closed ly525 closed 2 years ago

ly525 commented 2 years ago

Basic Info

额外补充

$ tsc && cp -rf src/scripts/changelog/template/ lib/scripts/changelog/template
Done in 14.02s.
lerna info run Ran npm script 'build' in '@arco-design/arco-cli-block' in 8.8s:
yarn run v1.22.10
$ tsc
Done in 8.33s.
lerna ERR! yarn run build exited 127 in '@arco-design/arco-components'
lerna ERR! yarn run build stdout:
yarn run v1.22.10
$ arco-scripts build:component:es && arco-scripts build:component:css
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run build stderr:
/bin/sh: arco-scripts: command not found
error Command failed with exit code 127.

lerna ERR! yarn run build exited 127 in '@arco-design/arco-components'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @arco-design/arco-cli@ preRelease: `lerna run clean && lerna run build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @arco-design/arco-cli@ preRelease 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/lambert/.npm/_logs/2021-10-28T14_13_21_057Z-debug.log

预期结果

能够本地构建成功,并在本地debug

复现步骤

node -v: v12.22.1 yarn -v: 1.22.10

git clone npm run init npm run preRelease

MisterLuffy commented 2 years ago

This situation is caused by @arco-design/arco-components relying on @arco-design/arco-scripts, you can try to use lerna bootstrap to solve it. Anyway, I will try to provide a more friendly environment initialization command.

ly525 commented 2 years ago

@MisterLuffy 上面的步骤中,执行了 npm run init, 所以是执行了 lerna bootstrap的

要在哪一步在执行一遍 learna bootstrap 吗?

MisterLuffy commented 2 years ago

@MisterLuffy 上面的步骤中,执行了 npm run init, 所以是执行了 lerna bootstrap的

要在哪一步在执行一遍 learna bootstrap 吗?

可以尝试更新最新的代码重试,已经把 @arco-design/arco-components 从 yarn workspace 中移除了。