BigBalli commented on issue #661:
URL: https://github.com/apache/cordova-cli/issues/661#issuecomment-4179806554

   Hey — it looks like the root cause here is having `node_modules` inside the 
`www/` folder. Cordova copies everything in `www/` into the platform assets, 
and when symlinks are present (like the ones npm creates in `.bin/`), the 
`fs.cp` call chokes trying to copy a symlink that points back into itself.
   
   Your workaround of deleting `www/node_modules/.bin` confirms this. The more 
permanent fix would be to avoid running `npm install` inside `www/` altogether 
— keep your frontend dependencies in the project root (or a separate `src/` 
folder) and use a build step to output only the final assets into `www/`. That 
way Cordova never tries to copy `node_modules` symlinks during `platform add`.
   
   Have you tried that approach? Curious if it fully resolves it for your 
workflow.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to