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

objectSpread2 error after running unit test #2680

Open
eric-burel opened this issue Jan 20, 2021 · 2 comments
Open

objectSpread2 error after running unit test #2680

eric-burel opened this issue Jan 20, 2021 · 2 comments
Labels

Comments

@eric-burel
Copy link
Contributor

eric-burel commented Jan 20, 2021

Describe the bug
When running unit test, and then running the app, we get:
Error: Cannot find module '/code/lfg/Vulcan/.meteor/local/build/programs/server/node_modules/@babel/runtime/helpers/objectSpread2'
We need to reinstall meteor npm i @babel/runtime@latest so the app run again.

To Reproduce
On Vulcan devel branch:
meteor npm run test-unit
meteor npm run start

Expected behavior

The start should work after tests are run.
It seems that the test mode install an old version of @babel/runtime, so we need to reinstall the latest version everytime we want to start the normal app again.

@ErikDakoda
Copy link
Contributor

The same thing happens to me as well when I run unit tests on my own codebase. It is very strange and annoying. I have done some digging in the past and I couldn't find any discussions or solutions online.

I have resolved to not stress about it for now. I have added a script to my package.json that I run when I finish a unit testing session:

"meteor:repair": "meteor npm install meteor-node-stubs@latest @babel/runtime@latest --save",

@eric-burel
Copy link
Contributor Author

Still happens after updating to meteor v2

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

No branches or pull requests

2 participants