On WSL Linux the generator widget does not resolve to the correct working directory. I've looked at the issue and it seems that the Yeoman environment is created without an explicit cwd.
If you add these lines to packages/generator-widget/bin.js it should be fine.
#!/usr/bin/env node
import { join, dirname } from "path";
import { fileURLToPath } from "url";
import chalk from "chalk";
import { createEnv } from "yeoman-environment";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
console.log(chalk.bold.blueBright("Initializing the widget generator..."));
const env = createEnv({ cwd: process.cwd() });
env.cwd = process.cwd();
env.register(join(__dirname, "./generators/app/index.js"), "@mendix/widget");
const args = process.argv.slice(2);
env.run(["@mendix/widget", ...args].join(" "));
On WSL Linux the generator widget does not resolve to the correct working directory. I've looked at the issue and it seems that the Yeoman environment is created without an explicit cwd.
If you add these lines to
packages/generator-widget/bin.jsit should be fine.