fiori-elements-incident-management
fiori-elements-incident-management copied to clipboard
TypeError: DEBUG is not a function
Use the current version of SAP Business Application Studio based on the following tutorial: https://developers.sap.com/tutorials/fiori-tools-cap-create-application.html
$ npm run watch
> [email protected] watch
> npx cds watch
(node:3082) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3082) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
[INTERNAL ERROR] TypeError: DEBUG is not a function
at Server.listening (/home/user/.node_modules_global/lib/node_modules/@sap/cds-dk/lib/watch/livereload-server.js:24:16)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please report this error.
It seams that the following code returns undefined:
const DEBUG = cds.debug('cli|watch|livereload')
As a workaround the following command starts the system:
DEBUG=all cds watch
I had another issue: [cds] - @sap/cds 4.6.6 loaded: /home/user/fiori-elements-incident-management/node_modules/@sap/cds [cds] - Command resolved: /home/user/.node_modules_global/lib/node_modules/@sap/cds-dk/bin/watch.js /home/user/fiori-elements-incident-management/node_modules/@sap/cds/lib/env/index.js:257 o = o[next] || (o[next] = {}) ^
TypeError: Cannot read properties of null (reading 'watch')
This was solved by using the newest cds version in package.json