【问题标题】:Error code Trying to copy from a source that does not exist错误代码尝试从不存在的源复制
【发布时间】:2021-05-20 02:51:40
【问题描述】:

当我在Your First Extension | Visual Studio Code Extension API 学习 VS 代码插件/扩展教程时,我收到了以下错误。

> yo code

? What type of extension do you want to create? New Extension (TypeScript)
? What's the name of your extension? HelloWorld
? What's the identifier of your extension? helloworld
? What's the description of your extension?
? Initialize a git repository? Yes
? Bundle the source code with webpack? No
? Which package manager to use? npm

Writing in C:\pg\vscode\helloworld...
Error code

Trying to copy from a source that does not exist: C:\Program Files (x86)\Nodist\bin\node_modules\generator-code\generators\app\templates\ext-command-ts/vscode

只是我运行的命令,作为教程,

npm install -g yo generator-code
yo code

我使用的是 Windows 10 升级版 Powershell。错误有什么问题以及如何解决?

【问题讨论】:

    标签: visual-studio-code yeoman


    【解决方案1】:

    从上下文“Nodist”来看,我假设您已经在除了 node.js 实例之外的机器上安装了 Nodist。我不确定你是如何安装 node.js 的,但看起来问题的原因是你的 node.js 和 Nodist 的冲突。

    也许您可以尝试卸载 Nodist 并重试,或者在不同的机器或虚拟机上尝试相同的命令?

    【讨论】:

      【解决方案2】:

      对我来说,卸载 NodeJS/Nodist 并在名称中没有空格的目录中重新安装可以解决此问题。绝对是经典的 Windows 问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-07-28
        • 1970-01-01
        • 1970-01-01
        • 2018-03-18
        • 1970-01-01
        • 2016-01-04
        • 2015-08-24
        • 2017-11-15
        相关资源
        最近更新 更多