Skip to content

Instantly share code, notes, and snippets.

@gryzzly
Created April 6, 2023 20:13
Show Gist options
  • Save gryzzly/211c9c16a14cb9ca46d1a646335a0657 to your computer and use it in GitHub Desktop.
Save gryzzly/211c9c16a14cb9ca46d1a646335a0657 to your computer and use it in GitHub Desktop.
deno run --watch ./html/index.html build.js produces an error attempting to execute html file
# this is a minimal reproducible example to illustrate how deno is attempting to execute
# an html file passed in as a value for --watch option
#
# tested with deno 1.24.3 and 1.32.1
% mkdir html
% touch html/index.html
% echo "<\!doctype html>" >> html/index.html
% touch build.js
% echo "console.log('build running');" >> build.js
% deno run --watch "./html/index.html" -A build.js
Watcher Process started.
error: The module's source code could not be parsed: Expected ';', '}' or <eof> at file:///Users/misha/Source/test-deno-watch/src/html/index.html:1:11
Watcher Process finished. Restarting on file change...
@gryzzly
Copy link
Author

gryzzly commented Apr 7, 2023

It’s --watch=filename.txt !!!

that’s the issue above! missing "=" sign.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment