Open levkovsb opened 1 month ago
Hi @levkovsb ,
thanks for bringing this up again. Can you run npm rebuild
in your repository and see if that recreates the symlink?
Best, Daniel
@levkovsb also, can you please describe your setup in more detail or, preferably, provide a minimal reproduction setup? Is cds-types referenced in the mono repo root or in one of the subprojects?
@daogrady I have tried npm rebuild, it does not solve the issue. We have cds-types referenced in the package.json file in the monorepo root as a devDependency. There we also define our workspaces, e.g. "plugin/cross/*". Then in the plugin/cross/com folder we have its own package.json file that does not reference cds-types. The problem occurs when we run commands like npm publish.
The symlink is often deleted. if i call mtb build, afterwards it is gone (because it calls npm i). "npm rebuild" does the magic.
Hi @levkovsb ,
as @Markus-Schroeder-de suggested, you can try npm repair
to see if that fixes the symlink.
Could you elaborate why you don't just reference @cap-js/cds-types
in each project's devDependency
list?
Best, Daniel
The issue persists in the version 0.6.5. As long as I execute any npm script in one of the workspaces of our monorepo, the symlink is gone and the project is no longer runnable. Please investigate further
Originally posted by @levkovsb in https://github.com/cap-js/cds-types/issues/216#issuecomment-2371170882