Skip to content

Commit cffa086

Browse files
committed
update example-cap-server README
1 parent 2387943 commit cffa086

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

example-cap-server/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Example CAP Server
22

3-
## Node and local dependencies
3+
## CDS and local dependencies
44

5-
In [package.json](./package.json), we declare our library as a local `file:` dependency. There is a bug in node where
6-
such local dependencies cause imports _from the local dependency's code_ to fail, because of the way symlinks are
7-
handled. For details see https://github.com/nodejs/node/issues/3402.
5+
Ideally, we would want to mount our library as a `file:` dependency in this sample project. Unfortunately CDS does not
6+
handle `file:` dependencies correctly, because they are realized through symlinks.
7+
https://github.tools.sap/cap/issues/issues/14395
88

9-
To fix this behavior, you need to run `node` with the option `--preserve-symlinks`.
9+
To circumvent this, we now copy the required file at runtime into the dependencies of the sample project. See the
10+
`copy-library` task in [package.json](./package.json). This step is not necessary when installing our library normally.
11+
We do it here, so that new library code can be manually tested in this little sample project, without being released.

0 commit comments

Comments
 (0)