title: ng generate: An unhandled exception occurred: The "path" argument must be of type string. Received undefined
body: <p>When I run <code>ng g foo</code> or <code>ng g library foo</code>, I get</p>
  <blockquote>
  <p>An unhandled exception occurred: The &quot;path&quot; argument must be of type string. Received undefined</p>
  </blockquote>
  <p>My log has,</p>
  <pre><code>[error] TypeError [ERR_INVALID_ARG_TYPE]: The &quot;path&quot; argument must be of type string. Received undefined
      at validateString (internal/validators.js:124:11)
      at Object.resolve (path.js:1074:7)
      at isInside (/home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/utilities/config.js:211:35)
      at /home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/utilities/config.js:221:28
      at Array.filter (&lt;anonymous&gt;)
      at findProjectByPath (/home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/utilities/config.js:221:10)
      at Object.getProjectByCwd (/home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/utilities/config.js:250:21)
      at GenerateCommand.getDefaultSchematicCollection (/home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/models/schematic-command.js:304:38)
      at async GenerateCommand.parseSchematicInfo (/home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/commands/generate-impl.js:70:30)
      at async GenerateCommand.initialize (/home/ecarroll/cp/js/cjt3/node_modules/@angular/cli/commands/generate-impl.js:17:49)
  </code></pre>
  <hr />
  <p>Versions.</p>
  <pre><code>Angular CLI: 12.1.1
  Node: 14.17.3
  Angular: 11.2.14
  </code></pre>