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

TypeError: DEBUG is not a function #11

Open
ManuelB opened this issue Apr 12, 2023 · 2 comments
Open

TypeError: DEBUG is not a function #11

ManuelB opened this issue Apr 12, 2023 · 2 comments

Comments

@ManuelB
Copy link

ManuelB commented Apr 12, 2023

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

> fiori_elements_tutorial@1.0.0 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')
@ManuelB
Copy link
Author

ManuelB commented Apr 12, 2023

As a workaround the following command starts the system:

DEBUG=all cds watch

@ghost
Copy link

ghost commented Jul 7, 2023

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

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

1 participant