Skip to content

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined #22

@KR1470R

Description

@KR1470R

included this plugin into my project by this way:

const CRX = require("crx-webpack-plugin");
module.exports = {
    ...
    plugins: [
        new CRX({
              contentPath: "./src/recorder_extension",
              outputPath: "./dist/recorder_extension",
              name: "recorder",
         }),
    ],
    ...
}

and getting the error when trying to build my project:

[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Object.isAbsolute (node:path:1157:5)
    at new Plugin (..../node_modules/crx-webpack-plugin/index.js:21:23)
    at Object.<anonymous> (..../webpack.config.js:52:5)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Module.require (node:internal/modules/cjs/loader:1057:19) {
  code: 'ERR_INVALID_ARG_TYPE'
}

any ideas what went wrong? thanks.

versions:

"webpack": "^5.79.0",
"webpack-cli": "^5.0.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions