【问题标题】:parcel build error: "extendDefaultPlugins"包裹构建错误:“extendDefaultPlugins”
【发布时间】:2021-11-04 15:07:38
【问题描述】:

我正在尝试构建我的项目。

我刚开始使用包裹。要构建过程,我有这个命令行

"build": "parcel build index.html --dist-dir ./dist"

我收到此错误。

console: 
"extendDefaultPlugins" utility is deprecated.
Use "preset-default" plugin with overrides instead.
For example:
{
  name: 'preset-default',
  params: {
    overrides: {
      // customize plugin options
      convertShapeToPath: {
        convertArcs: true
      },
      // disable plugins
      convertPathData: false
    }
  }
}

√ Built in 4.24s

dist\index.html                3.74 KB    879ms
dist\favicon.9a1bb8f5.png      13.3 KB     24ms
dist\logo.9272a069.png        92.31 KB     49ms
dist\icons.9801e6f1.svg        8.81 KB    871ms
dist\index.20fbdb0c.css        9.96 KB    2.00s
dist\index.4a83a35e.js       125.64 KB    1.68s
dist\icons.9801e6f1.svg        8.81 KB    871ms
[Error: Error opening directory]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forkify@1.0.0 build: `parcel build index.html --dist-dir ./dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forkify@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

我找不到解决办法。

请帮帮我。

【问题讨论】:

  • 根据弃用警告:我在parcel bundler项目中发现了这个问题:github.com/parcel-bundler/parcel/issues/6744。此警告似乎与错误无关。为了深入挖掘,我们需要更多细节。
  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。
  • 这是来自 svgo(优化 svg 文件的模块)的警告。这可能意味着 Parcel 更新了版本,但没有更新配置。根据github问题,它已经修复但尚未发布。请耐心等待,警告可能会消失是一个新版本。暂时忽略它。

标签: parceljs


【解决方案1】:

这是an issue in parcel 2.0.0-rc.0,即现在发布的版本2.0.0中的fixed

它没有功能影响 - 这只是一个警告,@parcel/optimizer-htmlnano 配置 svgo 的方式最终应该是 be updated to use a new technique

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-02
    • 1970-01-01
    • 2021-08-24
    • 1970-01-01
    • 2014-07-30
    • 2020-04-28
    相关资源
    最近更新 更多