When using yarn create umi projectName under win11, the error file name, directory name or volume label syntax is incorrect.
Reasons for occurrence:
When creating the project, we always execute commands in the C drive, so we delete the '%~dp0' symbol, save it again, and configure the environment variables.
@“%~dp0\C:\Users\22180\AppData\Local\Yarn\Data\global\node_modules.bin\create-umi.cmd” %*
Find the bin file of the node_global directory under your own node.js installation. There will be two files.
create-umi
create-umi.cmd
Modify the contents in create-umi.cmd and save it
@“\C:\Users\22180\AppData\Local\Yarn\Data\global\node_modules.bin\create-umi.cmd” %*
Then do not re-yarn crate umi at this time, because the original file will be overwritten again.
Just create-umi. If it prompts "Not an internal or external command", you need to add the directory of create-umi.cmd to the path of the environment variable.
D:\leadingEnd\nodeJs\node_global\bin