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: Cannot read properties of undefined (reading 'trim') #10

Open
ElPrudi opened this issue Sep 1, 2022 · 0 comments
Open

TypeError: Cannot read properties of undefined (reading 'trim') #10

ElPrudi opened this issue Sep 1, 2022 · 0 comments

Comments

@ElPrudi
Copy link

ElPrudi commented Sep 1, 2022

  • Webpack Version: 5.74.0
  • Operating System (or Browser): Windows 32 Bit, enviroment is NW.js
  • Node Version: 18.7.0
  • webpack-plugin-ramdisk Version: 0.2.0

How Do We Reproduce?

I've just installed this plugin and followed the tutorial under "Usage". I'm using a merged webpack configuration using webpack-merge version 5.8.0 and environment variables. My command looks like this:

webpack --progress --config webpack.dev.js --env NODE_ENV=development

and my configuration looks like this:

const { WebpackPluginRamdisk } = require('webpack-plugin-ramdisk')
....
const common = require('./webpack.common.js')

module.exports = (env) => merge(common(env), {
    mode: 'development',
    ....
    plugins: [
        ....
        new WebpackPluginRamdisk()
    ]
   ....
})

Expected Behavior

I'm only testing out the plugin. So it should successfully compile.

Actual Behavior

⬡ webpack-plugin-ramdisk: Initializing RAMdisk. You may be prompted for credentials
[webpack-cli] TypeError: Cannot read properties of undefined (reading 'trim')
    at module.exports.commandSync (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-plugin-ramdisk\node_modules\execa\index.js:226:26)
    at create (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-plugin-ramdisk\lib\ramdisk.js:33:38)
    at init (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-plugin-ramdisk\lib\ramdisk.js:61:26)
    at new WebpackPluginRamdisk (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-plugin-ramdisk\lib\index.js:39:22)
    at module.exports (D:\Dev\VSCode\JavaScript\<project>\webpack.dev.js:29:9)
    at loadConfigByPath (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-cli\lib\webpack-cli.js:1439:37)
    at async Promise.all (index 0)
    at async WebpackCLI.loadConfig (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-cli\lib\webpack-cli.js:1454:35)
    at async WebpackCLI.createCompiler (D:\Dev\VSCode\JavaScript\<project>\node_modules\webpack-cli\lib\webpack-cli.js:1785:22)
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