Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cap-js/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky committed Nov 14, 2023
2 parents 43519ec + 9e5b7ce commit 6573d42
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 31 deletions.
2 changes: 0 additions & 2 deletions get-started/jumpstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ Choose the **LTS** version, via the left-hand side button:
npm add -g @sap/cds-dk
cds #> run the installed CLI
```
[Running into problems? → See the troubleshooting guide.](troubleshooting#npm-installation){.learn-more}



### 3. Install Git
Expand Down
24 changes: 5 additions & 19 deletions get-started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,9 @@ uacp: This page is linked from the Help Portal at https://help.sap.com/products/

## General { #cds}

### How Do I Resolve Installation Issues with Node.js and NPM? { #npm-installation}

##### Check the registry settings of your npm configuration

Make sure that you don't have old registry entries anymore for `@sap:registry` in your _.npmrc_. Just execute:

```sh
npm config delete "@sap:registry"
```

Type `npm config list` to check the configuration, which is stored in a file _.npmrc_ in the user's home directory. There, no `@sap:registry` should appear.

[Learn more about the move to **npmjs.org** in the blog post by DJ Adams.](https://blogs.sap.com/2020/07/02/sap-npm-packages-now-on-npmjs.org/){.learn-more}

##### Check the Node.js version { #node-version}

Make sure you run the latest long-term support (LTS) version of Node.js with an even number like `16`. 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:
Make sure you run the latest long-term support (LTS) version of Node.js with an even number like `20`. 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:

```sh
node -v
Expand Down Expand Up @@ -124,7 +110,7 @@ cds.on('served', ()=>{
})
```

It is important to note that by Node.js `emit` are synchronous operations, so, **avoid _any_ `await` operations** in there, as that might lead to race conditions. In particular, when registering additional event handlers with a service, as shown in the snippet above, this could lead to very heard to detect and resolve issues with handler registrations. So, for example, don't do this:
It is important to note that by Node.js `emit` are synchronous operations, so, **avoid _any_ `await` operations** in there, as that might lead to race conditions. In particular, when registering additional event handlers with a service, as shown in the snippet above, this could lead to very hard to detect and resolve issues with handler registrations. So, for example, don't do this:

#### DON'T:

Expand All @@ -138,17 +124,17 @@ cds.on('served', async ()=>{
### My app isn't showing up in Dynatrace

Make sure that:
- Your app's start script is `cds run` instead of `npx cds run`.
- Your app's start script is `cds-serve` instead of `npx cds run`.
- You have the dependency `@dynatrace/oneagent-sdk` in your _package.json_.

### Why are requests occasionally rejected with "Acquiring client from pool timed out" or "ResourceRequest timed out"?

This error indicates, that the settings of the pool containing the database clients don't match the application's needs. There are two possible root causes.
This error indicates database client pool settings don't match the application's requirements. There are two possible root causes:

| | Explanation |
| --- | ---- |
| _Root Cause 1_ | The maximum number of database clients in the pool is reached and additional requests wait too long for the next client.
| _Root Cause 2_ | The amount of time for creating a new connection to the database takes too long.
| _Root Cause 2_ | The creation of a new connection to the database takes too long.
| _Solution_ | Adapt `max` or `acquireTimeoutMillis` with more appropriate values, according to the [documentation](../node.js/databases#databaseservice-configuration).

Always make sure that database transactions are either committed or rolled back. This can work in two ways:
Expand Down
30 changes: 20 additions & 10 deletions plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ These plugins are created and maintained in close collaboration and shared owner
font-style: italic;
margin: -44px 0 40px;
}
main .vp-doc a:has(> img) {
display: inline-flex;
align-items: center;
transition: opacity 0.2s;
}
main .vp-doc a:has(> img):hover {
opacity: 0.7;
}
main .vp-doc a:has(> img):not(:last-child) {
margin-right: 1em;
}
</style>


Expand Down Expand Up @@ -64,9 +75,8 @@ The GraphQL Adapter is a protocol adapter that generically generates a GraphQL s

Available for:

[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 1em" />](https://www.npmjs.com/package/@cap-js/graphql)
[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 0.2em;" />](https://www.npmjs.com/package/@cap-js/graphql)

Click on the icon to get detailed instructions. {.learn-more}



Expand All @@ -77,12 +87,12 @@ The OData v2 Proxy is a protocol adapter that allows you to expose your services

Available for:

[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 1em" />](https://www.npmjs.com/package/@cap-js-community/odata-v2-adapter)
[<img src="../assets/logos/java.svg" style="height:3em; display:inline; margin:0 1em" />](../java/migration#v2adapter)
[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 0.2em;" />](https://www.npmjs.com/package/@cap-js-community/odata-v2-adapter)
[<img src="../assets/logos/java.svg" style="height:3em; display:inline; margin:0 0.2em;" />](../java/migration#v2adapter)

Click on the icons to get detailed instructions. {.learn-more}

See also [_Advanced > OData APIs > V2 Support_](../advanced/odata#v2-support) {.learn-more}
See also [_Advanced > OData APIs V2 Support_](../advanced/odata#v2-support) {.learn-more}



Expand All @@ -94,7 +104,7 @@ The UI5 Dev Server is a CDS server plugin that enables the integration of UI5 (U

Available for:

[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 1em" />](https://www.npmjs.com/package/cds-plugin-ui5)
[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 0.2em;" />](https://www.npmjs.com/package/cds-plugin-ui5)

Click on the icon to get detailed instructions. {.learn-more}

Expand All @@ -118,7 +128,7 @@ annotate my.Incidents {

Available for:

[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 1em" />](https://npmjs.com/package/@cap-js/change-tracking)
[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 0.2em;" />](https://npmjs.com/package/@cap-js/change-tracking)

Click on the icon to get detailed instructions. {.learn-more}

Expand Down Expand Up @@ -148,8 +158,8 @@ Features:

Available for:

[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 1em" />](../guides/data-privacy/audit-logging)
[<img src="../assets/logos/java.svg" style="height:3em; display:inline; margin:0 1em" />](../java/auditlog)
[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 0.2em;" />](../guides/data-privacy/audit-logging)
[<img src="../assets/logos/java.svg" style="height:3em; display:inline; margin:0 0.2em;" />](../java/auditlog)

Click on the icons to get detailed instructions. {.learn-more}

Expand Down Expand Up @@ -180,7 +190,7 @@ Features:

Available for:

[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 1em" />](https://github.com/cap-js/notifications#readme)
[<img src="../assets/logos/nodejs.svg" style="height:2.5em; display:inline; margin:0 0.2em;" />](https://github.com/cap-js/notifications#readme)

Click on the icon to get detailed instructions. {.learn-more}

Expand Down

0 comments on commit 6573d42

Please sign in to comment.