jaredpalmer / jaredpalmer/backpack

Nodemon configuration does not allow for white spaces

Open
#71 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4.4k
Forks
164
PR merge metrics
No merged PRs in 30d

Description

I'm currently running into the same issue as issue #59, where backpack cannot run because there are white spaces in the directory where I am executing the command. Please note that I'm running Windows 10.

I have reason to believe that the way that you configured Nodemon to run is at fault.

```
const startServer = () => {
const serverPaths = Object
.keys(serverCompiler.options.entry)
.map(entry => path.join(serverCompiler.options.output.path, `${entry}.js`))
nodemon({ script: serverPaths[0], watch: serverPaths, nodeArgs: process.argv.slice(2) })
.on('quit', process.exit)
}
```

If I hardcode nodemon to use **'./build/main'**, instead of **serverPaths[0]**, everything works fine. I could create a pull request but I'm not sure if that's the most elegant solution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the startServer function shown in the issue and inspect how serverPaths[0] is passed to nodemon. Reproduce the command on Windows with a project path containing spaces, then verify that the server starts successfully without hardcoding './build/main'.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, webpack
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.