The TailwindCSS CLI fails to execute commands when the project is located in a directory path containing spaces. This issue occurs during the build process, as paths with spaces are not handled properly.
Expo project with nativewind and gluestack ui
After runing npm run start command. I will get this Log:
Error running TailwindCSS CLI, please run the CLI manually to see the error.
Command used: node D:\__ project\movie-db\node_modules\tailwindcss\lib\cli.js --input "D:\__ project\movie-db\src\styles\global.css" --output "D:\__ project\movie-db\node_modules\.cache\nativewind\global.css.web.css" --watch
Error: Cannot find module 'D:__'
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.10.0
## Expected Behavior
the path should be in `double quotes (")` so spaces in folder names wouldn't trow error
```bash
❌ Wont Work:
node D:\__ project\movie-db\node_modules\tailwindcss\lib\cli.js
✅ Will Work:
node "D:\__ project\movie-db\node_modules\tailwindcss\lib\cli.js"
Hello
Description
The TailwindCSS CLI fails to execute commands when the project is located in a directory path containing spaces. This issue occurs during the build process, as paths with spaces are not handled properly.
Expo
project withnativewind
andgluestack ui
npm run start
command. I will get this Log:Error: Cannot find module 'D:__' at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }
Node.js v20.10.0
Environment
Node.js version: v20.10.0 TailwindCSS version: ^3.4.15 Operating System: Windows 10 NativeWind version: ^4.0.36
Is This related to NativeWind?
Thanks for reading