renative icon indicating copy to clipboard operation
renative copied to clipboard

[Windows, macOS] Running a project with a space symbol in it's path produces an error

Open RicardasN opened this issue 3 years ago • 0 comments

I found this during testing of FlexStudio on Windows, if the project is placed in a location like this: C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test Meaning it has spaces between words, running this project will not be possible, this is the error I see in the CLI window:

Dev server running at: http://127.0.0.1:8083/index.android.bundle?platform=android


[ hook ] [start] executePipe ('start:after')
[ info ] [start] No buld hooks found and in --ci mode. SKIPPING
[ task ] <= [run] <= start
- Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[1]
[ task ] [run] _isBundlerRunning[2] (NO)
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'C:\Users\VENOEN\Documents\Test'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
COMMAND:

node C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test\node_modules\react-native/local-cli/cli.js start --port 8083 --config=metro.config.js --no-interactive

FAILED with ERROR:

Command failed with exit code 1 (Unknown system error -1): node C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test\node_modules\react-native/local-cli/cli.js start --port 8083 --config=metro.config.js --no-interactive

Error: Command failed with exit code 1 (Unknown system error -1): node C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test\node_modules\react-native/local-cli/cli.js start --port 8083 --config=metro.config.js --no-interactive
    at makeError (C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test\node_modules\rnv\node_modules\execa\lib\error.js:58:11)
    at handlePromise (C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test\node_modules\rnv\node_modules\execa\index.js:112:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)


/ Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[3]
[ task ] [run] _isBundlerRunning[4] (NO)
| Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[5]
[ task ] [run] _isBundlerRunning[6] (NO)
\ Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[7]
[ task ] [run] _isBundlerRunning[8] (NO)
- Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[9]
[ task ] [run] _isBundlerRunning[10] (NO)
- Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[11]
[ task ] [run] _isBundlerRunning[12] (NO)
/ Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[13]
[ task ] [run] _isBundlerRunning[14] (NO)
| Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[15]
[ task ] [run] _isBundlerRunning[16] (NO)
\ Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[17]
[ task ] [run] _isBundlerRunning[18] (NO)
- Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[19]
[ task ] [run] _isBundlerRunning[20] (NO)
- Waiting for bundler to finish...[ task ] [run] _isBundlerRunning[21]
[ task ] [run] _isBundlerRunning[22] (NO)
× Can't connect to bundler. Try restarting it.
┌──────────────────────────────────────────────────────────────────────────────┐
│  RNV  SUMMARY | 08/12/2021, 16:10:10                                         │
│  $ rnv run -p android -s debug -c helloworld -t 'Pixel_2_API_29' --ci        │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 0.34.0-feat-electron-linux.0                              │
│  Project Name ($package.name): Test                                          │
│  Project Version ($package.version): 0.1.0                                   │
│  Workspace ($.workspaceID): rnv                                              │
│  Platform (-p): android                                                      │
│  Engine ($.platforms.android.engine): engine-rn                              │
│  App Config (-c): helloworld                                                 │
│  Build Scheme (-s): debug                                                    │
│  Target (-t): 'Pixel_2_API_29'                                               │
│  Supported Platforms: android                                                │
│  Env Info: win32 | x64 | node v14.15.5                                       │
│  Executed Time: 0h:0m:12s:498ms                                              │
│                                                                              │
│ [ error ] [run] Can't connect to bundler. Try restarting it.
│                                                                              │
│  Project location:                                                           │
│  C:\Users\VENOEN\Documents\Test Flexn Studio\Project X\FlexCode\Test\platformBuilds\helloworld_android
└──────────────────
───────────────────

Screenshot 2021-12-08 at 16 16 38

RicardasN avatar Dec 08 '21 14:12 RicardasN