代码之家  ›  专栏  ›  技术社区  ›  cameron cameron

webpack.config.js的“fullySpecified”出错,但不存在配置

  •  0
  • cameron cameron  · 技术社区  · 3 年前

    我得到了一个奇怪的错误:

    WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
       - configuration.module.rules[1].resolve has an unknown property 'fullySpecified'. These properties are valid:
         object { alias?, aliasFields?, cachePredicate?, cacheWithContext?, concord?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, ignoreRootsErrors?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, preferAbsolute?, resolver?, roots?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
    

    使用sls-deploy时 (部署到aws无服务器)

    然而,我没有webpack.config.js文件,以前也从未使用“fullySpecified”设置过配置设置。

    我所尝试的:

    • 正在项目中搜索术语“fullySpecified”-它不存在。
    • 没有webpack.config.js(与最初的代码一样)
    • 一个带有基本配置的webpack.config.js:
    module.exports = {
      target: 'node',
      mode: 'production'
    };
    

    我发现: https://githubmemory.com/repo/AnomalyInnovations/serverless-bundle/issues/259

    上下文

    • 这个代码已经有9个月的历史了,上次我写的时候有效
    • 我用过 npm update

    操作系统:linux

    • 节点版本:14.16.1
    • 框架版本:2.61.0(本地)
    • 插件版本:5.4.5
    • SDK版本:4.3.0
    • 组件版本:3.17.1

    package.json: “依赖项”:{ “axios”:“0.21.1”, “cors”:“2.8.4”, “自定义环境”:“^2.0.1”, “dotenv”:“^8.2.0”, “express”:“4.16.4”, “条纹”:“6.12.1”, “uuid”:“3.3.2”, “aws-sdk”:“^2.639.0” }, “devDependencies”:{ “巴氏合金芯”:“^6.25.0”, “babel loader”:“^7.1.1”, “babel插件转换运行时”:“^6.23.0”, “babel polyfill”:“^6.23.0”, “babel预设环境”:“^1.6.0”, “nodemon”:“1.18.4”, “无服务器捆绑包”:“^5.0.2”, “无服务器伪参数”:“^2.5.0”, “无服务器网络包”:“^5.5.4”, “webpack”:“^5.58.0” }

    0 回复  |  直到 3 年前