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'}
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'}