VSCode 扩展的 Yeoman 快速入门不起作用

问题描述 投票:0回答:1

我正在按照 快速入门指南 使用 Yeoman 创建 VSCode 扩展。我运行了

yo code
,启动了扩展调试窗口,然后...“Hello World”命令没有显示。 (在 MacOS 上。)

我尝试过选择yarn和npm作为包管理器,结果相同。

我还验证了我有足够高的 VSCode 版本,无论如何,将所需的最低版本设置为

^0.0.0
时我没有看到任何差异。

不知道如何从这里继续。快速入门指南看起来确实已经过时了。例如,我在 Yeoman 提示中看到了这些差异:

# ? What type of extension do you want to create? New Extension (TypeScript)
# ? What's the name of your extension? HelloWorld
### Press <Enter> to choose default for all options below ###

# ? What's the identifier of your extension? helloworld
# ? What's the description of your extension? LEAVE BLANK
# ? Initialize a git repository? Yes
# ? Bundle the source code with webpack? No <---- this asked me for a specific bundler (none, webpack or esbuild)
# ? Which package manager to use? npm

# ? Do you want to open the new folder with Visual Studio Code? Open with `code`
  • yo
    版本 - 5.0.0
  • generator-code
    版本 - 1.9.0
  • VSCode 版本 - 1.89.1
visual-studio-code vscode-extensions yeoman-generator
1个回答
0
投票

问题是我没有在自己的 VSCode 窗口中打开扩展代码,这是必需的。或者,您可以将

.vscode
配置复制到活动窗口的顶级
.vscode
目录中,根据需要调整文件路径。

© www.soinside.com 2019 - 2024. All rights reserved.