Open eric-burel opened 3 years ago
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",
Still happens after updating to meteor v2
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 reinstallmeteor 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.