@
maichael 也不是,就是如果有解决过的话, 其实可能就是一句话的问题. 上面的那个 @
IvanLi127 已经说得比较到位了.
这个 excalidraw 涵盖这么多个 project
"workspaces": [
"excalidraw-app",
"packages/excalidraw",
"packages/utils",
"packages/math",
"examples/excalidraw",
"examples/excalidraw/*"
],
现在的问题是, 我希望是通过 sdk 集成的, 所以, 要把 packages/excalidraw 编译了, 发到 npm 做管理. 我尝试在我的环境里头编译 excalidraw-app 是没有问题的. 但是 编译 packages/excalidraw 是有问题的.
我截取个主要的报错,
},
"bugs": "
https://github.com/excalidraw/excalidraw/issues",
"homepage": "
https://github.com/excalidraw/excalidraw/tree/master/packages/excalidraw",
"scripts": {
"gen:types": "rm -rf types && tsc",
"build:esm": "rm -rf dist && node ../../scripts/buildPackage.js && yarn gen:types",
"pack": "yarn build:umd && yarn pack",
"start": "node ../../scripts/buildExample.mjs && vite",
"build:example": "node ../../scripts/buildExample.mjs",
"size": "yarn build:umd && size-limit"
}
}
PS E:\work\business\excalidraw\packages\excalidraw> npm run build:esm
> excalidraw-zh@1.0.4 build:esm
> rm -rf dist && node ../../scripts/buildPackage.js && yarn gen:types
'rm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Lifecycle script `build:esm` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: excalidraw-zh@1.0.4
npm ERR! at location: E:\work\business\excalidraw\packages\excalidraw
PS E:\work\business\excalidraw\packages\excalidraw> npm run pack
> excalidraw-zh@1.0.4 pack
> yarn build:umd && yarn pack
yarn run v1.22.22
error Command "build:umd" not found.
info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! Lifecycle script `pack` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: excalidraw-zh@1.0.4
npm ERR! at location: E:\work\business\excalidraw\packages\excalidraw