duan602728596 / qqtools

QQ群工具,提供48系成员直播监听,48系成员信息监听,微博监听,抖音监听,小红书监听,B站直播监听,群成员自动欢迎,定时消息,自定义命令等功能。
https://yzb1g5r02h.feishu.cn/docx/R123d4UKKovQx0x1dM2cDce7n9c
GNU Affero General Public License v3.0
290 stars 56 forks source link

packages/qqtools编译失败 #75

Closed Ripperso closed 3 years ago

Ripperso commented 3 years ago

windows系统,执行npm run build后报以下错误

C:\Robot\qqtools\packages\qqtools>npm run build

> @qqtools3/qqtools@4.6.1 build > npm run clean && cross-env NODE_ENV=production milktea-esm build

> @qqtools3/qqtools@4.6.1 clean > rimraf ./dist

cli.js build

编译代码

Options: --help Show help [boolean] --version Show version number [boolean] --config 配置文件的地址 [string] --webpackLog webpack日志类型 [string] --server 是否开启一个服务器 [boolean] --httpPort http服务的端口号 [number] --httpsPort https服务的端口号 [number] --serverRoot 服务器静态文件目录 [string] --log 开启日志 [boolean] ...

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' at new NodeError (node:internal/errors:363:5) at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:825:11) at Loader.resolve (node:internal/modules/esm/loader:89:40) at Loader.getModuleJob (node:internal/modules/esm/loader:242:28) at Loader.import (node:internal/modules/esm/loader:177:28) at importModuleDynamically (node:internal/modules/esm/translators:116:35) at exports.importModuleDynamicallyCallback (node:internal/process/esm_loader:30:14) at requireModule (file:///C:/Robot/qqtools/node_modules/@sweet-milktea/utils/esm/index.js:12:20) at requirePlugins (file:///C:/Robot/qqtools/node_modules/@sweet-milktea/milktea/esm/plugins/requirePlugins.js:6:12) at default (file:///C:/Robot/qqtools/node_modules/@sweet-milktea/milktea/esm/plugins/plugins.js:36:17) {code:'ERR_UNSUPPORTED_ESM_URL_SCHEME'}

duan602728596 commented 3 years ago

这个是window下import()的问题,我修复一下。

duan602728596 commented 3 years ago

脚手架的问题已经修复,更新一下@sweet-milktea开头的依赖。