Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to remove node_modules when it's not emtpy #25

Closed
mars-lan opened this issue Feb 10, 2021 · 2 comments
Closed

Attempt to remove node_modules when it's not emtpy #25

mars-lan opened this issue Feb 10, 2021 · 2 comments

Comments

@mars-lan
Copy link

During the clean step, the plugin assumes that it's okay to remove the entire node_modules if there's only scoped packages left: https://github.com/Butterwire/serverless-plugin-monorepo/blob/master/src/index.ts#L143

I'm not sure the logic behind that, but if you happen to have a node_modules with only non-hoisted scoped packages, it'll lead to the following error

Serverless: Cleaning dependency symlinks
 
  Error --------------------------------------------------
 
  Error: ENOTEMPTY: directory not empty, rmdir '<package_root>/node_modules'
@avnerenv0
Copy link

Also happening to us :(

@martin-css
Copy link
Contributor

A check has now been added to ensure the directory is truly empty before deleting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants