I am trying to kickstart a simple VS Code extension using Yeoman, on Windows 10 Pro.
I am facing the same kind of problem that is described here "Error code Trying to copy from a source that does not exist", however, my configuration is totally different (everything portable) and I suspect that even though the symptoms are the same, my problem has a completely different origin.
I am launching my Yeoman command from Cmder, which is a portable console emulator (https://cmder.net/) that already comes with Git in it.
In Cmder I first installed Yeoman and the VS Code Extension Generator, and this is what I got:
D:\Progs\Cmder (portable)
λ npm install -g yo generator-code
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
added 898 packages, and audited 899 packages in 1m
64 packages are looking for funding
run `npm fund` for details
7 vulnerabilities (5 moderate, 2 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 8.9.0 -> 8.10.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.10.0
npm notice Run npm install -g npm@8.10.0 to update!
npm notice
Then I tried to create my project with Yeoman, and this is what I got:
D:\Progs\VS Code (portable)\data\extensions
λ yo code
? ==========================================================================
We're constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time?
More info: https://github.com/yeoman/insight & http://yeoman.io
========================================================================== No
_-----_ ╭──────────────────────────╮
| | │ Welcome to the Visual │
|--(o)--| │ Studio Code Extension │
`---------´ │ generator! │
( _´U`_ ) ╰──────────────────────────╯
/___A___\ /
| ~ |
__'.___.'__
´ ` |° ´ Y `
? What type of extension do you want to create? New Extension (JavaScript)
? What's the name of your extension? axel.generique
? What's the identifier of your extension? axel-generique
? What's the description of your extension?
? Enable JavaScript type checking in 'jsconfig.json'? No
? Initialize a git repository? No
? Which package manager to use? npm
Writing in D:\Progs\VS Code (portable)\data\extensions\axel-generique...
Error code
Trying to copy from a source that does not exist: D:\Progs\Node.js (portable)\node_modules\generator-code\generators\app\templates\ext-command-js\vscode
It is probably important to mention that I am using a portable version of Node.js (and npm), located in "D:\Progs\Node.js (portable)", and of course I added this directory to my Path environment variable.
Thank you.