Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KR1470R opened this issue Apr 14, 2023 · 1 comment

Comments

@KR1470R
Copy link

KR1470R commented Apr 14, 2023

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"
@KR1470R
Copy link
Author

KR1470R commented Apr 14, 2023

it seems like crx-webpack-plugin should be updated for the last webpack version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant