实现场景:
windows 下编译/打包
1.x版本正常,2.x 拆分包后就再也没跑起来过
存在的问题:
编译报错...
当前方案:
无..
npm run build 输出如下
* Executing task: yarn run build
yarn run v1.22.19
$ npm run build --workspaces
> amis-formula@2.6.0 build
> npm run clean-dist && npm run genDoc && cross-env NODE_ENV=production rollup -c && cp src/doc.md lib/doc.md && cp src/doc.md esm/doc.md
> amis-formula@2.6.0 clean-dist
> rimraf lib/**
> amis-formula@2.6.0 genDoc
> ts-node ./scripts/genDoc.ts
公式文档生成 > E:\GitCodes\amis-projects\amis\packages\amis-formula\src\doc.ts
公式md生成 > E:\GitCodes\amis-projects\amis\packages\amis-formula\src\doc.md
./src/index.ts, ./src/doc.ts → lib...
created lib in 3.7s
./src/index.ts, ./src/doc.ts → esm...
created esm in 2.8s
'cp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: amis-formula@2.6.0
npm ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis-formula
> amis-core@2.6.0 build
> npm run clean-dist && NODE_ENV=production rollup -c
[..................] / : ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis-formula
> amis-core@2.6.0 clean-dist
> rimraf lib/** esm/**
'NODE_ENV' 不是内部或外部命令,也不是可运行的程序itCodes\amis-projects\amis\packages\amis-formula
或批处理文件。
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: amis-core@2.6.0
npm ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis-core
> amis-ui@2.6.0 build
> npm run clean-dist && NODE_ENV=production rollup -c
[..................] / : ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis-core
> amis-ui@2.6.0 clean-dist
> rimraf lib/** esm/**
'NODE_ENV' 不是内部或外部命令,也不是可运行的程序itCodes\amis-projects\amis\packages\amis-core
或批处理文件。
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: amis-ui@2.6.0
npm ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis-ui
> amis@2.6.0 build
> npm run clean-dist && sh build.sh
npm WARN ignoring workspace config at E:\GitCodes\amis-projects\amis\packages\amis/.npmrc ui
[..................] / : ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis-ui
> amis@2.6.0 clean-dist
> rimraf lib/** esm/**
'sh' 不是内部或外部命令,也不是可运行的程序: E:\GitCodes\amis-projects\amis\packages\amis-ui
或批处理文件。
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: amis@2.6.0
npm ERR! at location: E:\GitCodes\amis-projects\amis\packages\amis
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
* The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command yarn run build" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
1条答案
按热度按时间kmb7vmvb1#
👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.
Please review the labels and make any necessary changes.