Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Divyanshu-Mishra9620
Copy link

Description:

This PR resolves issue #12874, where running meteor test-packages could overwrite or contaminate the app’s node_modules directory, causing errors when starting the app.

Summary of changes:

Added a guard in tools/isobuild/meteor-npm.js to prevent rebuilt package directories from being renamed outside the test-runner’s working directory.
Ensured rebuilt npm package directories are saved with a .rebuild-saved-* suffix if outside the test-runner cwd, avoiding overwriting app dependencies.
Verified the fix with a minimal test app and package (test-smoke-app/packages/my-package), confirming that running test-packages no longer breaks the app’s npm dependencies.

Testing:

Added a minimal test package (my-package) with an npm dependency.
Ran meteor test-packages ./packages/my-package and then started the app with meteor run.
Confirmed the app starts without npm errors and that node_modules is not contaminated.

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for v3-meteor-api-docs canceled.

Name Link
🔨 Latest commit bf4df9c
🔍 Latest deploy log https://app.netlify.com/projects/v3-meteor-api-docs/deploys/68f7c56468e7710008832776

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for v3-migration-docs canceled.

Name Link
🔨 Latest commit bf4df9c
🔍 Latest deploy log https://app.netlify.com/projects/v3-migration-docs/deploys/68f7c564bb260d0008ee1cdf

@CLAassistant
Copy link

CLAassistant commented Oct 17, 2025

CLA assistant check
All committers have signed the CLA.

@Divyanshu-Mishra9620
Copy link
Author

@italojs Hey can you please review this PR

@italojs
Copy link
Member

italojs commented Oct 17, 2025

did you push all files? i cant see the tools/isobuild/meteor-npm.js described into PR

@italojs
Copy link
Member

italojs commented Oct 17, 2025

Should we maintain the test-smoke-app in the fix? it's looks like a test-app only

@Divyanshu-Mishra9620
Copy link
Author

Hi @italojs,

  • I have now pushed the changes to tools/isobuild/meteor-npm.js, the fix is included in the PR.
  • I have also removed the test-smoke-app directory from the branch, it was only for local testing.

@italojs
Copy link
Member

italojs commented Oct 20, 2025

The file has MANY linter changes, I can't see where the actual fix is. Could you please remove all those linter changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants