Webpack Compilation Error with cypress-drag-drop library

Viewed 30

I have added the cypress-drag-drop library in my project where I worked with Angular. In local, everything works fine and the tests passed. However, when I run the tests in Jenkins, it is displaying the next error:

enter image description here

I have configured how the readme.md said, so I don't understand why it is displaying this error.

In command.js, I have added:

enter image description here

In package.json:

enter image description here

My tsconfig.json:

enter image description here

I have tried to add an alias in my webpack.config.prod.js, but it is still failing.

module.exports = env => ({
  entry: path.resolve(__dirname, "src/root-config"),
  output: {
    filename: "root-config.js",
    libraryTarget: "system",
    path: path.resolve(__dirname, "dist")
  },
  devtool: "sourcemap",
  module: {
    rules: [
      { parser: { system: false } },
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: [{ loader: "babel-loader" }]
      }
    ]
  },
  resolve: {
    alias: {
      "@4tw": path.resolve(__dirname, "src")
    }
  },
  plugins: [
    new CopyWebpackPlugin([
      { from: path.resolve(__dirname, "src/favicon.ico"), to: "favicon.ico" },
      { from: path.resolve(__dirname, "img"), to: "img" },
      {
        from: path.resolve(__dirname, "src/importmap.json"),
        to: "importmap.json"
      },
      {
        from: path.resolve(__dirname, "node_modules/primeicons"),
        to: "primeicons"
      }
    ]),
    new HtmlWebpackPlugin({
      inject: false,
      template: "src/index.ejs",
      templateParameters: {
        isLocal: env && env.isLocal
      }
    }),
    new CleanWebpackPlugin()
  ],
  externals: ["single-spa", /^@monitor\/.+$/, "i18next"]
});

Does anybody has this error?

0 Answers
Related