# hs watch throws UnhandledPromiseRejectionWarning: RangeError

**URL:** <https://community.hubspot.com/t/hs-watch-throws-unhandledpromiserejectionwarning-rangeerror/19960>\
**Category:** CMS Development\
**Tags:** local-development\
**Created:** [April 9, 2020, 10:43am UTC](https://community.hubspot.com/t/hs-watch-throws-unhandledpromiserejectionwarning-rangeerror/19960 "2020-04-09T10:43:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MateuszFryc](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mateuszfryc/32/99782_2.png) [@MateuszFryc](https://community.hubspot.com/u/MateuszFryc)\
**Post date:** [April 9, 2020, 10:43am UTC](https://community.hubspot.com/t/hs-watch-throws-unhandledpromiserejectionwarning-rangeerror/19960/1 "2020-04-09T10:43:36Z")

</div>

I’m having trouble to run cli command: watch.

My projects structure looks as follows:

```auto
projectDir
 src (dir)
 website files
 hubspot.config.yml

```

I’ve tried to watch files by typing:

`hs watch src /`

but I’m getting the fallowing error:

```auto
(node:46314) UnhandledPromiseRejectionWarning: RangeError: path should be a `path.relative()`d string, but got "../../../../.."
 at throwError (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/ignore/index.js:337:9)
 at checkPath (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/ignore/index.js:356:12)
 at Ignore._test (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/ignore/index.js:473:5)
 at Ignore.ignores (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/ignore/index.js:512:17)
 at shouldIgnoreFile (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/@hubspot/cms-lib/ignoreRules.js:49:22)
 at ignored (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/@hubspot/cms-lib/lib/watch.js:101:22)
 at matchPatterns (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/anymatch/index.js:62:18)
 at FSWatcher._userIgnored (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/anymatch/index.js:94:14)
 at FSWatcher._isIgnored (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/chokidar/index.js:761:15)
 at FsEventsHandler._addToFsEvents (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/chokidar/lib/fsevents-handler.js:449:18)
(node:46314) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:46314) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/@hubspot/cms-lib/lib/walk.js:57
 return Promise.all(files.map(file => generateFilePromise(dir, file)));
 ^

TypeError: Cannot read property 'map' of undefined
 at processFiles (/usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/@hubspot/cms-lib/lib/walk.js:57:30)
 at /usr/local/lib/node_modules/@hubspot/cms-cli/node_modules/@hubspot/cms-lib/lib/walk.js:64:7
 at FSReqCallback.oncomplete (fs.js:154:23)

```

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [April 10, 2020, 2:21pm UTC](https://community.hubspot.com/t/hs-watch-throws-unhandledpromiserejectionwarning-rangeerror/19960/2 "2020-04-10T14:21:08Z")

</div>

@MateuszFryc I believe it’s because you need to upload your files in the design manager to a folder. Create a folder in the design manager at the root level called “groovy\_files” then your watch command would be

`hs watch src groovy_files`
