File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments