-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Won't run on Windows in folder 'drag&drop' #2569
Comments
@web2033 I tried to reproduce in my Windows 10 machine without success using a vanilla create-app. Does your repro do anything differently? Would you provide an example in GitHub in that case? |
The code doesn't matter here. Vanilla apps and any other of my existing projects won't run if I rename a folder to include Tried on other non-Vite projects. Same error. |
I don't understand why I can't reproduce in my Windows here. I'll let others with Windows machines test this one. |
Hello @web2033. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! |
Tried other projects for comparison - create-react-app, adonis-ts-app. |
For reference, in case it helps, it works both in dev and build on my Windows machine: C:\Vue\test\drag&drop (drag-drop@0.0.0) λ yarn build
yarn run v1.22.10
warning package.json: No license field
$ vite build
vite v2.1.3 building for production...
✓ 4 modules transformed.
dist/assets/favicon.17e50649.svg 1.49kbdist/index.html 0.45kbdist/assets/index.ccce2ca3.css 0.16kb / brotli: 0.10kb
dist/assets/index.b2293eba.js 0.77kb / brotli: 0.37kb
Done in 0.99s. |
It seems that the issue only occurs on npm, and does not occur on yarn nor pnpm, though the latter outputs some strange warnings. |
Yeah, was doing the same testing. Projects created with yarn work fine. (npm run dev, yarn dev both work) |
Looking into this further, it seems that |
This is an issue in npm, not an issue in vite.
Results in: > my-app@0.1.0 start
> react-scripts start
"test\my-app\node_modules\.bin\" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
node:internal/modules/cjs/loader:926
throw err;
^
Error: Cannot find module 'D:\CODE\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:923:15)
at Function.Module._load (node:internal/modules/cjs/loader:768:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code 1
npm ERR! path D:\CODE\apm&test\my-app
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-scripts start
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Timson\AppData\Local\npm-cache\_logs\2021-03-27T19_31_11_997Z-debug.log |
Wait. I have it working with another project using npm - https://preview.adonisjs.com/guides/quick-start
then rename the folder to drag&drop
Works! |
@web2033 well, it either works because ampersand was not present in path at package installation time or because you had yarn installed globally at installation time and create-adonis-ts-app uses the same technique of autodetecting global yarn and switching to it for build. |
It seems to work with
|
You cannot do the same trick with Vite as I did with
rename to drag&drop
Fail. |
Here is original issue npm/cmd-shim#45 |
The same error then html contain src without path. I suppose it is right behavior but bad debug messaging |
Describe the bug
Vite won't run on Win10 in the folder with the name
drag&drop
(both dev/build)Probably since Vite 1.x - #582
Logs
Translation:
"drop\node_modules.bin" - is not internal or external command, executable program, or batch file.
The text was updated successfully, but these errors were encountered: