Skip to content
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

(node:43172) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE #14

Open
RickR2H opened this issue Mar 16, 2022 · 4 comments

Comments

@RickR2H
Copy link

RickR2H commented Mar 16, 2022

I got an error with this command: "filecopy":"copy-and-watch --watch templates/files/media/**/*.{css,js} zzz/dist/"

[WATCH] templates/files/media/**/*.{css,js}
(node:43172) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Object.relative (path.js:492:5)
at findTarget (E:\wamp64\www\j41rbs5\node_modules\copy-and-watch\index.js:40:33)
at FSWatcher.copy (E:\wamp64\www\j41rbs5\node_modules\copy-and-watch\index.js:60:14)
at FSWatcher.emit (events.js:400:28)
at FSWatcher.emitWithAll (E:\wamp64\www\j41rbs5\node_modules\copy-and-watch\node_modules\chokidar\index.js:540:8)
at FSWatcher._emit (E:\wamp64\www\j41rbs5\node_modules\copy-and-watch\node_modules\chokidar\index.js:632:8)
at listener (E:\wamp64\www\j41rbs5\node_modules\copy-and-watch\node_modules\chokidar\lib\nodefs-handler.js:370:20)
(Use node --trace-warnings ... to show where the warning was created)
(node:43172) 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:43172) [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.

Hope you can fix this!

Thanks in advance!

@ba32107
Copy link

ba32107 commented Oct 23, 2022

same issue

@chrisbraddock
Copy link

chrisbraddock commented Oct 28, 2022

Me as well.

Windows.

Node 14.17.3.

@astery
Copy link

astery commented Mar 8, 2023

I had the same issue on 0.1.6, but I've tried a version from master and it works without the bug.

@astery
Copy link

astery commented Mar 8, 2023

Sorry, that's false. I was using not the master version but this fork - "[email protected]:HoldYourWaffle2/copy-and-watch.git" (which originates from this PR #5) - it works but outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants