wangEditor
wangEditor copied to clipboard
无法打包
问题描述
无法打包 当我从这里下载源码后,安装完依赖,执行yarn dev命令或者yarn build无法打包
wangEditor 版本
5
是否查阅了文档 ?
(文档链接 www.wangeditor.com )
是
最小成本的复现步骤
git clone 仓库地址 然后执行yarn dev或者yarn build 都会失败 yarn run v1.22.17 $ sh build/build-all.sh dev $ cross-env NODE_ENV=development rollup -c rollup.config.js Error loading tslib helper library. [!] Error: Package subpath './package.json' is not defined by "exports" in D:\搜狗高速下载\wangEditor-master\wangEditor-master\node_modules\rollup-plugin-typescript2\node_modules\tslib\package.json Error: Package subpath './package.json' is not defined by "exports" in D:\搜狗高速下载\wangEditor-master\wangEditor-master\node_modules\rollup-plugin-typescript2\node_modules\tslib\package.json at new NodeError (node:internal/errors:399:5) at exportsNotFound (node:internal/modules/esm/resolve:361:10) at packageExportsResolve (node:internal/modules/esm/resolve:697:9) at resolveExports (node:internal/modules/cjs/loader:567:36) at Function.Module._findPath (node:internal/modules/cjs/loader:636:31) at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27) at Function.Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:110:18) at Object. (D:\搜狗高速下载\wangEditor-master\wangEditor-master\node_modules\rollup-plugin-typescript2\src\tslib.ts:11:23)
我是直接从github下载源码,并未改动里面的配置文件。出现这个情况是什么原因,可以解答下吗?谢谢。
同样无法打包
@ZhongboHuang @keep-gogogo 先安装好git vscode中修改终端环境为 git bash 如下图
输入命令 yarn dev
把node版本切到14就行