Skip to content

fix(cli/init): remove tmp 'node_modules' dir on init npm project #29639

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edilson258
Copy link
Contributor

Closes #29513

When creating a new project using deno init --npm <package> a temporary node_modules directory is created to store the package initializers scripts.

example:

deno init --npm solid

A temporary node_modules directory will be created to store the solid initializers scripts under node_modules/create-solid

This PR aims to delete that node_modules directory after initialization since it is not longer needed.

@edilson258 edilson258 force-pushed the fix/remove-tmp-node-modules branch from 3405b05 to 9900112 Compare June 6, 2025 16:09
@bartlomieju
Copy link
Member

Some projects automatically install packages - this change would cause the installation process to be discarded. I'm -1 on this change.

@dsherret
Copy link
Member

dsherret commented Jun 6, 2025

Most likely what I think should happen instead is deno init --npm should implicitly run with the --node-modules-dir=none setting, but I'm not 100% sure. That way the node_modules directory doesn't get populated with the create-... package

@edilson258
Copy link
Contributor Author

i think everyone disagree with this patch, so we can close it right?

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

Successfully merging this pull request may close these issues.

Remove node_modules folder created for initializing an NPM project
3 participants