D
Deno

help

error: Uncaught (in promise) SyntaxError: Invalid regular expression flags

Sshervin12/21/2023
After Updating my fresh to latest version I got following error
deno task start
Task start deno task run:trusted --
error: Uncaught (in promise) SyntaxError: Invalid regular expression flags
at Object.evalContext (ext:core/01_core.js:826:14)
at wrapSafe (node:module:704:25)
at Module._compile (node:module:718:27)
at Object.Module._extensions..js (node:module:745:10)
at Module.load (node:module:656:32)
at Function.Module._load (node:module:537:12)
at Module.require (node:module:675:19)
at require (node:module:789:16)
at Object.<anonymous> (file:myrepo/node_modules/.deno/tailwindcss@3.3.5/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:17:58)
at Object.<anonymous> (file:///C:myrepo/node_modules/.deno/tailwindcss@3.3.5/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:168:4)
Watcher Process failed. Restarting on file change...
deno task start
Task start deno task run:trusted --
error: Uncaught (in promise) SyntaxError: Invalid regular expression flags
at Object.evalContext (ext:core/01_core.js:826:14)
at wrapSafe (node:module:704:25)
at Module._compile (node:module:718:27)
at Object.Module._extensions..js (node:module:745:10)
at Module.load (node:module:656:32)
at Function.Module._load (node:module:537:12)
at Module.require (node:module:675:19)
at require (node:module:789:16)
at Object.<anonymous> (file:myrepo/node_modules/.deno/tailwindcss@3.3.5/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:17:58)
at Object.<anonymous> (file:///C:myrepo/node_modules/.deno/tailwindcss@3.3.5/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:168:4)
Watcher Process failed. Restarting on file change...
DAHDeno AI Helper12/21/2023
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error message you've provided, it seems like there might be an issue with a regular expression in your code or one of the modules you are using. The error message indicates that there is an invalid regular expression flag being used. Regular expression flags in JavaScript are limited to g (global match), i (ignore case), m (multiline), u (unicode), y (sticky), and s (dotAll). If any other character is used as a flag, it will result in a SyntaxError. From the stack trace you've provided, it appears that the error is coming from a file within the tailwindcss module, which is unusual since tailwindcss is not typically run within Deno, and the stack trace includes references to node:module, which suggests that the code is being executed in a Node.js context rather than Deno. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. If you are indeed trying to run tailwindcss within Deno, ensure that you are using the correct module and that it is compatible with Deno. If you are using Node.js, you may want to check the version of tailwindcss you are using and ensure that it is installed correctly.

Looking for more? Join the community!