You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: get-started/get-help.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ To start VS Code via the `code` CLI, users on macOS must first run a command (*S
34
34
35
35
### Check the Node.js version { #node-version}
36
36
37
-
Verify that you run the latest long-term support (LTS) version of Node.js with an even number like `20`, `22`, `24`, and so on. Refrain from using odd versions, for which some modules with native parts will have no support and thus might even fail to install. Check version with:
37
+
Run the latest LTS version of Node.js (even numbers: 20, 22, 24). Avoid odd versions, as some modules with native parts may not install. Check version with:
38
38
39
39
```sh
40
40
node -v
@@ -48,7 +48,7 @@ For [Cloud Foundry](https://docs.cloudfoundry.org/buildpacks/node/index.html#run
48
48
49
49
### Check access permissions on macOS or Linux
50
50
51
-
In case you get error messages like `Error: EACCES: permission denied, mkdir '/usr/local/...'` when installing a global module like `@sap/cds-dk`, configure `npm` to use a different directory for global modules:
51
+
If you get error messages like `Error: EACCES: permission denied, mkdir '/usr/local/...'` when installing a global module like `@sap/cds-dk`, configure `npm` to use a different directory for global modules:
52
52
53
53
```sh
54
54
mkdir ~/.npm-global ; npm set prefix '~/.npm-global'
@@ -72,7 +72,7 @@ Verify that your `PATH`-environment variable contains this path.
72
72
In addition, set the variable `NODE_PATH` to: <br /> ``C:\Users\<your-username>\AppData\Roaming\npm\node_modules``.
73
73
74
74
75
-
### How to consume a new version of CDS? { #cds-versions}
75
+
### Updating CDS Versions { #cds-versions}
76
76
77
77
* Design time tools like `cds init`:
78
78
@@ -136,9 +136,9 @@ cds.on('served', async ()=>{
136
136
137
137
### Why does my app not show up in Dynatrace?
138
138
139
-
Make sure that:
140
-
-Your app's start script is `cds-serve`instead of `npx cds run`.
141
-
-You have the dependency `@dynatrace/oneagent-sdk` in your _package.json_.
139
+
Requirements:
140
+
-App start script is `cds-serve`(not `npx cds run`)
141
+
-Dependency `@dynatrace/oneagent-sdk`is in _package.json_
142
142
143
143
### Why are requests rejected with HANA timeout errors?
144
144
@@ -234,8 +234,8 @@ module.exports = cds.server
234
234
|_Solution 2_| Try `npm rebuild` or add `@cap-js/cds-types` in your _tsconfig.json_. |
235
235
236
236
237
-
#### Install package as dev dependency
238
-
The type definitions for `@sap/cds` are maintained in a separate package `@cap-js/cds-types` and have to be explicitly installed as a dev dependency. This can be done by adding the `typescript` facet:
237
+
#### Install as dev dependency
238
+
Install type definitions by adding the `typescript` facet:
239
239
240
240
::: code-group
241
241
```sh [facet]
@@ -250,7 +250,7 @@ npm i -D @cap-js/cds-types
250
250
251
251
Installing `@cap-js/cds-types` leverages VS Code's automatic type resolution mechanism by symlinking the package in `node_modules/@types/sap__cds` in a postinstall script. If you find that this symlink is missing, try `npm rebuild` to trigger the postinstall script again.
252
252
253
-
If the symlink still does not persist, you can explicitly point the type resolution mechanism to `@cap-js/cds-types` in your_tsconfig.json_:
253
+
If the symlink doesn't persist, explicitly configure_tsconfig.json_:
254
254
255
255
::: code-group
256
256
```json [tsconfig.json]
@@ -262,30 +262,27 @@ If the symlink still does not persist, you can explicitly point the type resolut
262
262
```
263
263
:::
264
264
265
-
If you find that the types are still incomplete, open a bug report in [the `@cap-js/cds-types` repository](https://github.com/cap-js/cds-types/issues/new/choose).
265
+
For incomplete types, report issues in [the `@cap-js/cds-types` repository](https://github.com/cap-js/cds-types/issues/new/choose).
266
266
267
267
268
268
269
269
270
270
### How to fix "`tar: Error is not recoverable: exiting now`"?
271
271
272
-
If you get the error `tar: Error is not recoverable: exiting now` (for example, when building MTX resources)
273
-
you can try installing the tar library for better compatibility with Windows systems.
274
-
275
-
Add it to your devDependencies like so:
272
+
If you get this error (for example, when building MTX resources), install the tar library for better Windows compatibility:
276
273
277
274
```sh
278
275
npm add -D tar
279
276
```
280
-
On macOS and Linux, the built-in implementation will continue to be used.
277
+
On macOS and Linux, the built-in implementation continues to be used.
281
278
282
279
283
280
284
281
## Java
285
282
286
-
### How can I make sure that a user passes all authorization checks?
283
+
### How to bypass authorization checks?
287
284
288
-
A new option `privilegedUser()`can be leveraged when [defining](../java/event-handlers/request-contexts#defining-requestcontext) your own `RequestContext`. Adding this introduces a user, which passes all authorization restrictions. This is useful for scenarios, where a restricted service should be called through the [local service consumption API](../java/services) either in a request thread regardless of the original user's authorizations or in a background thread.
285
+
Use `privilegedUser()` when [defining](../java/event-handlers/request-contexts#defining-requestcontext) your own `RequestContext`. This introduces a user that passes all authorization restrictions. Useful when calling a restricted service through the [local service consumption API](../java/services) regardless of the original user's authorizations or in a background thread.
289
286
290
287
### Why do I get a "User should not exist" error during build time?
291
288
@@ -319,8 +316,9 @@ To fix this, either switch the Node.js version using a Node version manager, or
319
316
320
317
### How can I expose custom REST APIs with CAP?
321
318
322
-
You might want to expose additional REST APIs in your CAP application that aren't covered through CAP's existing protocol adapters (for example, OData V4). A common example is a CSV file upload or another type of custom REST endpoint.
323
-
In that case, you can leverage the powerful capabilities of Spring Web MVC by implementing your own RestController. From within your RestController implementation, you can fully leverage all CAP Java APIs. Most commonly you'll be interacting with your services and the database through the [local service consumption API](../java/services). To learn more about Spring Web MVC, see the [Spring docs](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc), [Spring Boot docs](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc), and this [tutorial](https://spring.io/guides/gs/serving-web-content/).
319
+
To expose additional REST APIs not covered by CAP's protocol adapters (for example, OData V4), implement your own Spring Web MVC RestController. Common examples include CSV file uploads or custom REST endpoints.
320
+
321
+
Your RestController can fully leverage CAP Java APIs. You'll typically interact with services and the database through the [local service consumption API](../java/services). Learn more: [Spring docs](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc), [Spring Boot docs](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc), and this [tutorial](https://spring.io/guides/gs/serving-web-content/).
324
322
325
323
### How can I build a CAP Java application without SQL database?
0 commit comments