1

I am looking to dabble in VS Code extension development. Their documentation suggests using Yeoman to generate the base project. I use yarn as my Node package manager, so I need to use yarn dlx to run the command (yarn global installs are no longer a thing). I ran into the issue that the generator for VS Code extensions needs to be present in order for Yeoman to work. I did some searching and happened upon this: https://github.com/yarnpkg/berry/pull/2679

In theory, that implements exactly what I need. In practice, however, it does not work. This is what happens when trying to generate the project:

$ yarn dlx -p generator-code -p yo yo code
➤ YN0000: ┌ Resolution step
➤ YN0061: │ @npmcli/move-file@npm:1.1.2 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0061: │ readdir-scoped-modules@npm:1.1.0 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0000: └ Completed in 8s 462ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 397ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ yo@npm:4.3.1 must be built because it never has been before or the last one failed
➤ YN0007: │ spawn-sync@npm:1.0.15 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.29.0 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 6s 20ms
➤ YN0000: Done with warnings in 15s 103ms

Error code 

You don't seem to have a generator with the name “code” installed.
But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/. 
Install them with npm install generator-code.

To see all your installed generators run yo --generators. Adding the --help option will also show subgenerators. 

If yo cannot find the generator, run yo doctor to troubleshoot your system.

I also tried flipping the -p order just in case that mattered (even though the above is essentially what the PR has), but that did not change anything. Does anyone have any ideas on what else to try?

dawsonc623
  • 1,841
  • 2
  • 16
  • 26

0 Answers0