错误“模块构建失败:TypeError:路径必须是字符串。未定义接收”

时间:2019-08-13 08:25:43

标签: javascript webpack

我通过安装yarn升级了软件包,并且出现了以下问题:

ERROR in ./node_modules/css-loader/dist/cjs.js?sourceMap&modules&localIdentName=!./node_modules/sass-loader/lib/loader.js!./src/pages/icons/Icons.scss
Module build failed: TypeError: Path must be a string. Received undefined

加载程序:

{
        test: /theme.scss$/,
        loaders: [
          'isomorphic-style-loader',
          `css-loader?${
            isDebug ? 'sourceMap&' : 'minimize&'
            }modules&localIdentName=[local]&importLoaders=2`,
          'sass-loader',
        ],
      },
      {
        test: reStyle,
        exclude: [/theme.scss$/],
        use: [
          'isomorphic-style-loader',
          `css-loader?${
            isDebug ? 'sourceMap&' : 'minimize&'
            }modules&localIdentName=
          ${
            isDebug ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]'
            }&importLoaders=2`,
          'sass-loader',
        ],
      }

我也将css-module降为2.1.1,sass-loader版本6.0.3。有人知道这笔交易吗?

0 个答案:

没有答案