We are using AWS code deploy with bitbucket to deploy our applications on our ec2 instances. This is a new issue that we faced for our angular project repository. This repo has node modules as we are using angular with node and hence these dependencies are needed. These dependencies are having directory names starting with special character @
. We found a thread on stack which said names with special charaters might cause a failure with a similar error we encountered.
The error we receive is
We are unable to resolve this. When we removed the node modules directory the deployment works fine. Hence we are sure that the issue has to be with the names. We cannot change or remove as these dependencies are used by angular. We believe there must be a way to tackle this and hence looking for suggetions. Appspec.yml file helps to filter out files, can that be helpful in this case?
Details of deployment:
We use the standard bitbucket code-deploy plugin to communicate with aws. The bitbucket repository branch to be deployed is set and the deployment group is selected to initiate the deployment.
The above image has the node modules bundled with the app in the same branch.We are using angular 7 with node hence these dependencies are needed. Now if we remove the node-modules directory, the deployment works fine. Hence we concluded that it is these special characters that are causing the failure.Here's another question which describes similar issue due to special characters.