I currently try to solve an error which I experience in Visual Studio Code.
I am currently working locally with SAP Cloud Application Programming and using the module @sap/cds-dk so I can enter cds command in the command line.
Whenever I enter "cds watch" i get the following error:
SyntaxError: Invalid regular expression: /app.+?\webapp/: \ at end of pattern
Command line error text from vscode
Whenever I use cds serve or go into debug mode it works without a problem. Only cds watch is having the issue.
I also tried:
- moving the workspace to a directory without spaces
- different node versions
- reinstalling node and vscode
- setting up a completely new workspace and project
The error remains in all cases the same. I have the feeling I am missing something and hope that you can help me find it.
Thank you for your help!
Tried to enter cds watch to start my application in local mode.
I currently try to solve an error which I experience in Visual Studio Code.
I am currently working locally with SAP Cloud Application Programming and using the module @sap/cds-dk so I can enter cds command in the command line.
Whenever I enter "cds watch" i get the following error:
SyntaxError: Invalid regular expression: /app.+?\webapp/: \ at end of pattern
Command line error text from vscode
Whenever I use cds serve or go into debug mode it works without a problem. Only cds watch is having the issue.
I also tried:
- moving the workspace to a directory without spaces
- different node versions
- reinstalling node and vscode
- setting up a completely new workspace and project
The error remains in all cases the same. I have the feeling I am missing something and hope that you can help me find it.
Thank you for your help!
Tried to enter cds watch to start my application in local mode.
Share Improve this question edited Jan 31 at 14:22 Jannik asked Jan 31 at 14:19 JannikJannik 33 bronze badges 1- Please do not include logs as images, include them as text. Anyway, I have reported this issue to the CDS developers. Thanks for posting it here. – Heiko Theißen Commented Jan 31 at 14:55
2 Answers
Reset to default 0cds-dk 8.7.0 was released 4 days ago. Maybe you noticed a window asking if you want to update ur global installation. There is something off in the new version when using vscode and windows 11. node.path returns a separator character (sep) which break the syntax in some new Regex expresions in the watch.js lib.
I rolled back my global installation to 8.6.1 for the moment. Consider raising a bug on the repository.
npm uninstall @sap/cds-dk -g
npm install @sap/[email protected] -g
The error has been corrected in @sap/[email protected].