visual-studio-code - 错误代码尝试从不存在的源复制
问题描述
当我在这里关注 VS 代码插件/扩展教程时,你的第一个扩展 | Visual Studio Code Extension API,我收到以下错误。
> 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 上。错误有什么问题以及如何解决?
解决方案
从上下文“Nodist”来看,我假设您已经在除了 node.js 实例之外的机器上安装了 Nodist。我不确定你是如何安装 node.js 的,但看起来问题的原因是你的 node.js 和 Nodist 的冲突。
也许您可以尝试卸载 Nodist 并重试,或者在不同的机器或虚拟机上尝试相同的命令?
推荐阅读
- python - 与广播连接
- sql-server - 使用 Laravel 将错误的本地日期格式保存到 SQL Server
- html - CSS中的渐变颜色与百分比
- python - How to start listing keys after a new line in a block
- java - 带有 LocalDateTime 问题的 Spring Thymeleaf
- powerbi - 在两个表之间建立关系后,“显示没有数据的项目”功能不起作用。如何解决这个问题?
- html - 浏览器调整大小时将子 div 文本换行到下一行
- javascript - pdf阅读器中的放大/缩小画布,导致鼠标坐标改变它的位置
- java - ListView 仅显示 ListView 第一个位置的最后一项
- javascript - JSON Stringify 忽略 Redis 发布上的嵌套对象